I would like to learn C++, Everytime I write the code or should I say copy the code down, I get to where I want to compile but cannot get the program started. Can any one help by explaining how after I copy the code the steps from then on. Thank you in advance.

What O/S?
What compiler?
What IDE?

If you compile it and it won't run maybe try adding system("PAUSE"); at the end of your code (right before return 0;). This will only work on Windows and isn't portable.

You can also see directories in the compiler and check the path in which your compiler is stored

I would like to learn C++, Everytime I write the code or should I say copy the code down, I get to where I want to compile but cannot get the program started. Can any one help by explaining how after I copy the code the steps from then on. Thank you in advance.

yes i can help you.please tell me clearly your query.

If you compile it and it won't run maybe try adding system("PAUSE"); at the end of your code (right before return 0;). This will only work on Windows and isn't portable.

Instead use this:

cin.ignore(cin.rdbuf()->in_avail());
cin.get();

thank you for this thread I will look into it.

Instead use this:

cin.ignore(cin.rdbuf()->in_avail());
cin.get();

An even better way would be run it from your console/command prompt! Since it's a "console" application!

And DO NOT use system("PAUSE"); . Not only is it non-portable, but its also a VERY expensive system call!

You should probably read the Sticky "How Do I Clear the Input Buffer?"

Chris

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.