|
|
- #include <string>
- #include <list>
- #include <deque>
- #include <vector>
-
- #include <bits/stl_list.h>
- #include <bits/stl_deque.h>
- #include <bits/stl_vector.h>
-
- int main(void)
- {
- #if 0
- vector<int>& Vec;
- #endif
- return 0;
- }
复制代码
系统是Fedore Core3 ,关掉条件编译则成功,打开则失败,错误如下:
- [root@root STL]# g++ test.cpp -o test
- test.cpp: In function `int main()':
- test.cpp:15: error: `vector' undeclared (first use this function)
- test.cpp:15: error: (Each undeclared identifier is reported only once for each function it appears in.)
- test.cpp:15: error: expected primary-expression before "int"
- test.cpp:15: error: expected `;' before "int"
- [root@root STL]#
复制代码 |
|