首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

使用流迭代器,初始化1个vector对象失败,求教,知道的快说下,小弟我还等着往下写呢

2012-02-13 
使用流迭代器,初始化1个vector对象失败,求教,知道的快说下,我还等着往下写呢#include iostream#include

使用流迭代器,初始化1个vector对象失败,求教,知道的快说下,我还等着往下写呢
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <iterator>
using   namespace   std;
int   main()
{

istream_iterator <string> in(cin),eof;
vector <string> st(in,eof);


}
我用的是vc++6.0编译
随便问下我给你们的分是哪来的啊,如果给光了,   我还能提问题吗???

[解决办法]
VC6要这样初始化
vector <string> st;
copy(in,eof,back_inserter(st));

热点排行