error C2678: 二进制“>>”: 没有找到接受“std::istream”类型的左操作数的运算符(或没有可接受的转换)
系统指示在cin>>s1这句出错,cout这句都对着,是什么原因呢,求解?intVector1(){vector<string>s1;cout<<"inputs1:";c...
系统指示在cin>>s1这句出错,cout这句都对着,是什么原因呢,求解?
int Vector1()
{
vector<string> s1;
cout<<"input s1:";
cin>>s1;
cout<<"s1 is:"<<s1<<endl;
string temp;
for(cin>>temp)
{
s1.push_back(temp);
cout<<s1<<endl;
}
return 0;
}
#include "StdAfx.h"
# include <iostream>
using namespace std;
# include <string>
# include <vector>
头文件齐全着呢 展开
int Vector1()
{
vector<string> s1;
cout<<"input s1:";
cin>>s1;
cout<<"s1 is:"<<s1<<endl;
string temp;
for(cin>>temp)
{
s1.push_back(temp);
cout<<s1<<endl;
}
return 0;
}
#include "StdAfx.h"
# include <iostream>
using namespace std;
# include <string>
# include <vector>
头文件齐全着呢 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询