[求助]cin>>问题
#include "stdafx.h"
#include <iostream.h>
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
string word;
while ( cin >> word )
cout<<"word read is:"<<word<<"\n";
cout<<"ok:no more words to read:bye!\n";
return 0;
}
输入 the apple is red
预期输出:word read is:the
word read is:apple
word read is:is
word read is:red
ok:no more words to read:bye!
为什么我编译不通过!!!
还有个问题:#include <iostream.h>和#include <iostream>有什么区别吗?
[此贴子已经被作者于2007-10-18 11:33:39编辑过]