C++ XCode 4仅显示带有endl的cout语句

C++ XCode 4仅显示带有endl的cout语句,c++,xcode4,cout,endl,C++,Xcode4,Cout,Endl,我对cout的陈述有一个非常奇怪的问题。我只在XCode 4中尝试过这一点。比如说我写, cout << "this works" << endl; cout << "this doesnt"; cout << memorySizeLimit << " blocks of memory available." << endl; coutstd::cout是一个流,通常会对其进行缓冲以提高性能。如果打印endl,流将被刷新(

我对cout的陈述有一个非常奇怪的问题。我只在XCode 4中尝试过这一点。比如说我写,

cout << "this works" << endl;
cout << "this doesnt";
cout << memorySizeLimit << " blocks of memory available." << endl;

cout
std::cout
是一个流,通常会对其进行缓冲以提高性能。如果打印
endl
,流将被刷新(
cout
std::cout
是一个流,通常会对其进行缓冲以提高性能。如果打印
endl
,流将被刷新(
cout同上:)FWIW,这是正常的流行为,不是Xcode特定的谢谢-我以前从未遇到过这个问题。请原谅这个尴尬的短语,但我现在会记住刷新!同上:)FWIW,这是正常的流行为,不是Xcode特定的谢谢-我以前从未遇到过这个问题。请原谅这句难听的话,但我现在会记得冲洗!
cout << memorySizeLimit << " blocks of memory available." << endl;
cout << "this works" << endl;
cout << "this doesn't";
cout << memorySizeLimit << " blocks of memory available." << endl;
cout << "this works" << endl;
cout << "this doesn't" << endl;
cout << "this doesn't" << flush;