方法之一:
//#include "stdafx.h"//vc++6.0加上这一行.#include #include using namespace std;int main(void){ string s; char ch; while(ch=cin.get(),ch!='\n') s+=ch; cout << s << endl; return 0;}