討論串[問題] 想要把pair的first跟second「換個名字」
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者AntaresStar時間16年前 (2010/05/09 13:50), 編輯資訊
0
0
0
內容預覽:
這樣改如何:. template <class T, class S>. struct MyType: public pair<T, S> {. #define MYTYPE_INIT height(first), weight(second), pair<T, S>. MyType() : MYT
(還有84個字)

推噓0(0推 0噓 16→)留言16則,0人參與, 最新作者CrBoy (上大學好忙喔)時間16年前 (2010/05/08 17:59), 編輯資訊
0
0
0
內容預覽:
遇到的問題: (題意請描述清楚). 過去我都會用 typedef pair<int,int> MyType; 來定義我要的pair型態. 但是這樣存取還是會遇到 xxx.first 跟 xxx.second 這樣的存取方式 很不好懂. 我希望可以用 xxx.height 跟 xxx.weight (
(還有681個字)
首頁
上一頁
1
下一頁
尾頁