| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 556 人关注过本帖
标题:[求助]为什么这个程序在VC6.0中会有错误
只看楼主 加入收藏
诗如
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-3-1
收藏
 问题点数:0 回复次数:0 
[求助]为什么这个程序在VC6.0中会有错误

如题:
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main()
{
vector<string> v;
ifstream in("Fillvector.cpp");
string line;
while(getline(in,line))
v.push_back(line);//Add the line to the end
//Add line numbers;
for(int i=0;i<v.size();i++)
cout<<i<<": "<<v[i]<<endl;
return 0;
}
在DEV-C++程序编译正确。在VC6.0中有如下提示错误:Cpp1.cpp
D:\新建文件夹\Cpp1.cpp(17) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_tra
its<char>,std::allocator<char> > const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,int>' : identifier was truncated to '255' characters in the debug information
D:\新建文件夹\Cpp1.cpp(17) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<ch
ar>,std::allocator<char> > &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,int>' : identifier was truncated to '255' characters in the debug information
d:\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::vector<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information
d:\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::~vector<st
d::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information

Cpp1.obj - 0 error(s), 4 warning(s)
寻求高人指点?

搜索更多相关主题的帖子: include 新建文件夹 numbers warning 
2006-03-12 17:13
快速回复:[求助]为什么这个程序在VC6.0中会有错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.038807 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved