我有一個表像這樣的MySQL,MySQL中的文本stroed爲「文本」和數字存儲爲「INT」 +----+-----------------------------------+---------+
| date | text | number |
+------+---------------------------------+---------+
| 12.1 | hell
我想編寫一個模板函數來檢查一些Timestamp屬性(類繼承自Timed),但也必須適用於沒有時間戳的類型。我發現的最好的(也是相當醜陋的)解決方案如下: class Timed {
protected:
int mTime;
public:
explicit Timed(int time=0): mTime(time){}
int getT(