954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

I would like to learn C++

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.

appy33
Newbie Poster
2 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

What O/S?
What compiler?
What IDE?

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 

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.

dmanw100
Posting Whiz in Training
242 posts since Apr 2008
Reputation Points: 104
Solved Threads: 27
 

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

ajay.krish123
Junior Poster in Training
90 posts since Nov 2008
Reputation Points: 6
Solved Threads: 9
 
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.

Stenna1
Newbie Poster
6 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

Here is the link that explain step by step procedure:

http://www.cs.cf.ac.uk/Dave/C/node3.html

Hope this will work for you

Monalisaparker
Newbie Poster
22 posts since Jan 2009
Reputation Points: 10
Solved Threads: 1
 
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();
skatamatic
Posting Shark
959 posts since Nov 2007
Reputation Points: 403
Solved Threads: 129
 

thank you for this thread I will look into it.

appy33
Newbie Poster
2 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

dont forget...... www.codeblocks.org

evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392
 

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

Freaky_Chris
Master Poster
702 posts since Apr 2008
Reputation Points: 325
Solved Threads: 118
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You