C++ Compiler?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Tiger

Platinum Member
Oct 9, 1999
2,312
0
0
AMDpwrd,

Try this code out.

#include <iostream.h>

int main()
{
cout << &quot;Hello World!&quot;<<endl;
system(&quot;PAUSE&quot;);
return 0;
}

The system statement is neccesary to keep the console on the screen long enough to see the output.



 

AMDPwred

Diamond Member
Mar 22, 2001
3,593
0
0
I didn't think up this code. I got it from a tutorial site. I know NOTHING about programming, all the code I provided means nothing to me:)

I'm going to try and follow the tutorial program so when I get into class I won't be a complete newbie. Can anybody offer any good books for C++ programming? Not deep stuff, just the basics really.

Thanks everybody for all the help:)
 

Tiger

Platinum Member
Oct 9, 1999
2,312
0
0
When I started this little &quot;teach myself C++&quot; project 6 months ago I got the Sams book &quot;Learn C++ in 21 days&quot;. It came with DJGPP and the learning edition of MS Visual C++ 6.0. The learning ed. of VC++ is crippled so you can't export the .exe's and .dll's you do.

I know a lot of guys have a problem with the SAMS books, but if you're doing this just to get a taste I think it's a good place to start. Your college textbook will go into much more detail.

 

Elledan

Banned
Jul 24, 2000
8,880
0
0
I agree with Tiger. SAMS books are pretty good. I've used them to learn Java and VB (which I aborted, because VB just plain sucks IMO).
 

EmperorNero

Golden Member
Jun 2, 2000
1,911
0
0


<< BTW, what are the replacements for the other escape codes (\t, \b, \a, etc?) >>



\a
\b
\f
\n
\r
\t
\\
\'
\&quot;
\xdd

and since we're recommending books, my comp sci teacher recommended object-oriented programming in c++ 3rd edition by robert lafore and it's a great book. it's a fat 900+ pages book and it covers c++ in depth. other people also recommend books by deitel and deitel. and for a free electronic version of thinking in c++, go to
www.bruceeckel.com
 

AMDPwred

Diamond Member
Mar 22, 2001
3,593
0
0
Ok, I've downloaded and installed Cygwin. When I double click on the desktop icon it just gives me a DOS prompt. What can I do so I can type in my source code and compile?
 

Pretender

Banned
Mar 14, 2000
7,192
0
0


<<

<< BTW, what are the replacements for the other escape codes (\t, \b, \a, etc?) >>



\a
\b
\f
\n
\r
\t
\\
\'
\&quot;
\xdd
>>

I meant what are their C++ replacements, like endl replaces \n, etc?