osx - C++ only prints one statement -


enter image description herei've started learning c++ programming language, using xamarin studio ide on osx 10.9.5 , following c++ language tutorial juan soulie'.

i'm following guide says whenever compile code:

#include <iostream> using namespace std;  int main() {     cout << "hello world! ";     cout << "i'm c++ program";     return 0; } 

the terminal screen appears , displays this!

hello world!     press key continue... logout  [process completed] 

is i'm doing wrong or issue compiler? tried xcode got same results.

sorry if question sounds dumb!

marc

i can't reproduce on machine i'm guessing need flush buffer, either cout << endl; or cout.flush();


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -