[問題] 關於operator
請問一下,我建了一個list中又有list的資料結構
大概像這樣子
class TPInGra{
typedef vector<_Point> Pos;
public:
void SetMidPoint(_Point P);
Pos& GetMidPoint();
bool GetMidPointIsEmpty();
private:
int TPID;
int TransitionID;
Pos MidPoint;
int ArcType;
};
class TruTPInGra{
typedef list<TPInGra> Contents;
public:
void addConData(TPInGra new_Row);
private:
Contents Load;
};
然後我現在要用串流將產生的物件存入檔案(及讀取)
那麼對於MidPoint的這個型態要紀錄的話,那麼operator要寫在哪個地方呢?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.18.48.28
推
09/14 17:13, , 1F
09/14 17:13, 1F
→
09/14 17:14, , 2F
09/14 17:14, 2F
→
09/14 17:14, , 3F
09/14 17:14, 3F
推
09/14 17:16, , 4F
09/14 17:16, 4F
→
09/14 17:18, , 5F
09/14 17:18, 5F
推
09/14 20:10, , 6F
09/14 20:10, 6F
→
09/14 20:32, , 7F
09/14 20:32, 7F
→
09/14 20:44, , 8F
09/14 20:44, 8F
推
09/15 07:34, , 9F
09/15 07:34, 9F
討論串 (同標題文章)
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章