谢谢

解决方案 »

  1.   

    包含STL的相关头文件#include <vector>
    #include <queue>由于STL库处于 std 名字空间里. 在你需要使用的模块里加入以下"引入名字空间"语句using namespace std;
    例子(来自MSDN):// vector_begin.cpp
    // compile with: /EHsc
    #include <vector>
    #include <iostream>int main( )
    {
       using namespace std;   
       vector <int> c1;
       vector <int>::iterator c1_Iter;
       vector <int>::const_iterator c1_cIter;
       
       c1.push_back( 1 );
       c1.push_back( 2 );   c1_Iter = c1.begin( );
       cout << "The first element of c1 is "<< *c1_Iter << endl;   *c1_Iter = 20;
       c1_Iter = c1.begin( );
       cout << "The first element of c1 is now "<< *c1_Iter << endl;   // The following line would be an error because iterator is const
       // *c1_cIter = 200;
    }
      

  2.   

    up to realdreamer(楼主英明,贫僧久仰大名,特来拜见)
      

  3.   

    在程序中包含头文件,注意要用C++头文件形式包含,如:
    #include <iostream>
    #include <string>
    #include <vector>
    ...using namespace std;...
    后面代码中使用即可