VC ++ 6.0不支持Vector吗? [英] Does Vector is not supported by VC++ 6.0??

查看:158
本文介绍了VC ++ 6.0不支持Vector吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VC ++编译器中使用了vector。我已经包含了


#include< string>

#include< algorithm>

#include< vector>


std :: vector< int> field;

std :: vector< int> :: size_type i;

test.cpp(135):错误C2653:''std'':不是类或命名空间名称

错误C2143:语法错误:缺少'';''之前''<''

错误C2501:''vector'':缺少存储空间-class或类型说明符

错误C2143:语法错误:缺少'';''之前''<''

错误C2653:''std'':是不是类或命名空间名称

有谁知道是什么问题?


问候

Bubunia

I have used vector in the VC++ compiler. I have included

#include <string>
#include <algorithm>
#include <vector>

std::vector<int> field;
std::vector <int>::size_type i;
test.cpp(135) : error C2653: ''std'' : is not a class or namespace name
error C2143: syntax error : missing '';'' before ''<''
error C2501: ''vector'' : missing storage-class or type specifiers
error C2143: syntax error : missing '';'' before ''<''
error C2653: ''std'' : is not a class or namespace name
Does anybody know what is the problem??

Regards
Bubunia

推荐答案



" Ram Laxman" < RA ******** @ india.com>在消息中写道

news:24 ************************** @ posting.google.c om ...

"Ram Laxman" <ra********@india.com> wrote in message
news:24**************************@posting.google.c om...
我在VC ++编译器中使用了vector。我已经包括了

#include< string>
#include< algorithm>
#include< vector>

std :: vector< INT> field;
std :: vector< int> :: size_type i;

test.cpp(135):错误C2653:''std'':不是类或命名空间名称
错误C2143:语法错误:缺少'';''之前''<''
错误C2501:''vector'':缺少存储类或类型说明符
错误C2143:语法错误:缺少'';''之前''<''
错误C2653:''std'':不是类或命名空间名称

有谁知道什么是问题?

问候
Bubunia
I have used vector in the VC++ compiler. I have included

#include <string>
#include <algorithm>
#include <vector>

std::vector<int> field;
std::vector <int>::size_type i;
test.cpp(135) : error C2653: ''std'' : is not a class or namespace name
error C2143: syntax error : missing '';'' before ''<''
error C2501: ''vector'' : missing storage-class or type specifiers
error C2143: syntax error : missing '';'' before ''<''
error C2653: ''std'' : is not a class or namespace name
Does anybody know what is the problem??

Regards
Bubunia



VC ++ 6支持
向量,你的代码看起来是正确的。所以你发布的代码

不是你编译的代码,或者你的编译器安装错误(或许是错误的b $ b)头文件的位置。


john



vector is supported by VC++6 and your code looks correct. So either the code
you''ve posted isn''t the code you''ve compiled, or your compiler is installed
incorrectly (perhaps its looking in the wrong places for header files).

john


Ram Laxman写道:
Ram Laxman wrote:
我用过矢量在VC ++编译器中。我已经包括了

#include< string>
#include< algorithm>
#include< vector>

std :: vector< INT> field;
std :: vector< int> :: size_type i;

test.cpp(135):错误C2653:''std'':不是类或命名空间名称
错误C2143:语法错误:缺少'';''之前''<''
错误C2501:''vector'':缺少存储类或类型说明符
错误C2143:语法错误:缺少'';''之前''<''
错误C2653:''std'':不是类或命名空间名称

有谁知道什么是问题??
I have used vector in the VC++ compiler. I have included

#include <string>
#include <algorithm>
#include <vector>

std::vector<int> field;
std::vector <int>::size_type i;
test.cpp(135) : error C2653: ''std'' : is not a class or namespace name
error C2143: syntax error : missing '';'' before ''<''
error C2501: ''vector'' : missing storage-class or type specifiers
error C2143: syntax error : missing '';'' before ''<''
error C2653: ''std'' : is not a class or namespace name
Does anybody know what is the problem??




在没有std ::的情况下试试吧。



Try it without "std::".


Ram Laxman写道:
Ram Laxman wrote:
我在VC ++编译器中使用了vector。我已经包括了

#include< string>
#include< algorithm>
#include< vector>

std :: vector< INT> field;
std :: vector< int> :: size_type i;

test.cpp(135):错误C2653:''std'':不是类或命名空间名称
错误C2143:语法错误:缺少'';''之前''<''
错误C2501:''vector'':缺少存储类或类型说明符
错误C2143:语法错误:缺少'';''之前''<''
错误C2653:''std'':不是类或命名空间名称

有谁知道什么是问题??
I have used vector in the VC++ compiler. I have included

#include <string>
#include <algorithm>
#include <vector>

std::vector<int> field;
std::vector <int>::size_type i;
test.cpp(135) : error C2653: ''std'' : is not a class or namespace name
error C2143: syntax error : missing '';'' before ''<''
error C2501: ''vector'' : missing storage-class or type specifiers
error C2143: syntax error : missing '';'' before ''<''
error C2653: ''std'' : is not a class or namespace name
Does anybody know what is the problem??




你显然没有发布产生上述错误的代码所以

它很难帮助你。你有没有试过编译你自己发布的6条线?


Mike



You obviously haven''t posted the code that produced the above error so
it will be hard to help you. Have you tried compiling the 6 lines you
have posted by themselves?

Mike


这篇关于VC ++ 6.0不支持Vector吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆