主题:关于vc++6.0编译器的问题
vc++6.0平台下进行c++编程,
可是debug的时候系统提示 for (vector<int>::size_type b=0;b!=ivec1.size();++b ) 语句出现如下错误:
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2653: 'vector<int,class std::allocator<int> >' : is not a class or namespace name
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2065: 'size_type' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2146: syntax error : missing ';' before identifier 'b'
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2065: 'b' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2143: syntax error : missing ')' before '++'
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : warning C4552: '!=' : operator has no effect; expected operator with side-effect
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2059: syntax error : ';'
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(20) : error C2143: syntax error : missing ';' before '{'
经检查,无输入拼写或语法错误,我想问一下各位高手,这是编译器的问题吗?谢谢
可是debug的时候系统提示 for (vector<int>::size_type b=0;b!=ivec1.size();++b ) 语句出现如下错误:
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2653: 'vector<int,class std::allocator<int> >' : is not a class or namespace name
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2065: 'size_type' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2146: syntax error : missing ';' before identifier 'b'
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2065: 'b' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2143: syntax error : missing ')' before '++'
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : warning C4552: '!=' : operator has no effect; expected operator with side-effect
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2059: syntax error : ';'
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(18) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio\MyProjects\cpp1\cpp1.cpp(20) : error C2143: syntax error : missing ';' before '{'
经检查,无输入拼写或语法错误,我想问一下各位高手,这是编译器的问题吗?谢谢