在C++中怎么将string用cout输出

在C++中如何将string用cout输出在C++中如何将string用cout输出[解决办法]直接cout str;就行了 [解决办

在C++中如何将string用cout输出
在C++中如何将string用cout输出

[解决办法]
直接
cout < <str;就行了

[解决办法]
行的,但须头文件 <string>
[解决办法]
完全可以啊,记得头文件和using namespace std;
string str= "jfdowqfj ";
cout < <str < <endl;
[解决办法]
#include <iostream>
#include <sstream>
using namespace std;

.......
string a = "How are you ? ";
cout < <a < <endl;


[解决办法]
在VC++。NET中不能这样


//////////////////////
VC的东西离标准差太远了~~
呵呵
[解决办法]
#include <string>
#include <iostream>
#include <windows.h>
void couthahaha(string a)
{
cin > > a;
cout < < a;
system( "pause ");
}
[解决办法]
#include <string>
#include <iostream>

....
string str= "aaaaaaaa ";//string str( "aaaaaaa ");
cout < <str < <endl;