#include <vector>using namespace std;class CEditGridCtrlCtrl : public COleControl
{
        ......
vector<vector<int>> content;//这句如果去掉,编译就通过。如果不去掉,报错如下:error C2146: syntax error : missing ',' before identifier 'content'
error C2065: 'content' : undeclared identifier
error C2143: syntax error : missing '>' before ';'
error C2208: 'class std::vector' : no members defined using this type环境:VC6.0

解决方案 »

  1.   

    试试vector<std::vector<int>> content; 呢?
      

  2.   

    使用似乎是没有问题的,vector<vector<int>_>注意我下划线那里,一定要存在空格。
      

  3.   

    去namespace,然后用
    std::vector< std::vector<int> > .....;
    就像楼上的那位说的,不能出现两个>连在一起的情况。。
    我试了没问题的。
      

  4.   

    两个>>....
    你想想在c里面是什么意思吧,位操作忘了??
      

  5.   

    不加空格,编译器误以为是>>。具体看c++模板内容
      

  6.   

    >> 这里也不是必须有空格的,是目前的C++编译器的问题,未来的编译器会智能一点,但是要等到2009年以后了。
      

  7.   

    用typedef就不会出现这样的问题了typedef vector<int> INTVCT;vector<INTVCT> content;