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

在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;