#include<vector> #include<iostream> #include<stdio.h> //如果tuple.h在common.h前面,程序会报错,如果放在后面则正常。 //说明包引入有先后顺序,使用时要注意 #include "tuple.h" #include "common.h" int main(){ typedef Pair<char,int> t_pair; t_pair tp('a',1); std::cout << sizeof(tp) << std::endl; return 0; }
错误示例:包引入顺序
猜你喜欢
转载自javaeye-hanlingbo.iteye.com/blog/2410318
今日推荐
周排行