编译通不过,咋办?
#include "stdafx.h"
#include "iostream.h"
#include <string>
using namespace std;
int main()
{
string x="7";
string y="&";
x+=y;
x+="8";
cout<<x<<endl;
}
编译出现如下提示:C:\Documents and Settings\Administrator\桌面\357357357\357357357.cpp(16) : error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>' (or there is no acceptable conversion)