2009-05-20 90 views

回答

2

//你有把endl放在你的输出结尾吗?

int main() 
{ 
    cout << "!!!Hello World!!!"; // prints nothing to console ; no endl 
    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! twice 
    return 0; 
} 
+1

添加endl flush为我工作,但有很多围绕此讨论,我不知道这是否总是工作。值得关注相关的Windows问题(这似乎与32位和64位环境问题有关):http://www.eclipse.org/forums/index.php?t=msg&th=197552&start=0&S=2a2b64e1f1404705c0214976bd477428 – Mick 2010-11-26 14:59:58

相关问题