C++ Compiler?

AMDPwred

Diamond Member
Mar 22, 2001
3,593
0
0
Is there anywhere I can download a free compiler? I'm just messing around with C++ and need something to compile my "Hello World" program with:)

Since I start programming this fall, I'd like to go in with at least a little bit of experience. I don't want to be completly new.
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
dont get any compilier made my microsoft, Ive used most of them and they suck. Borland rules.
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
The only problem with borland is that it breeds files worse than rabbits. Just make a nifty clean.bat and you should be all set.
 

AMDPwred

Diamond Member
Mar 22, 2001
3,593
0
0
For some reason the Borland compiler will not start the download. Is there another one I can use?
 

AMDPwred

Diamond Member
Mar 22, 2001
3,593
0
0
Ok, now I'm confused. I've written the "Hello World" program in notepad and would like to compile it and run the program. How can I do this? What exactly do I need to do? Here is the source code:

#inclued <iostream.h>

int main()
{
cout << &quot;Hello World!\n&quot;;
return 0;
}
 

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
Shouldn't the return type be void?

So &quot;void main&quot;?

I might be wrong. I suck at programming.



KeyserSoze
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
#include <iostream.h>

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


I fixed some spelling, and coding. You can use the \n, but its not AP. Using an endl is much better in the long run.
Now just press &quot;build&quot; or compile. In Borland pressing f9 does the trick.
 

AMDPwred

Diamond Member
Mar 22, 2001
3,593
0
0
I'm not able to get the Borland download to start. But for when I do...would I just write the code in the Borland program and compile it from there?
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
Yes, this would be easier if you AIM'ed me.

&quot;govkid01&quot;

You need to start a new text-edit.
 

Tiger

Platinum Member
Oct 9, 1999
2,312
0
0
Start Dev C++ and open a new project. Give the project a name such as &quot;Hello&quot;.
Dev C++ will ask you what kind of app you want to do Console, Windows, etc.... Pick one.
Dev C++ will open up it's text editor and you can simply cut and paste the code.
Click the green check mark on the button bar to compile then the one next to it to run the app.

 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
tiger correct. When you combine c and c++ sometimes the compiler craps itself. Especially when you have a huge program :(
 

Pretender

Banned
Mar 14, 2000
7,192
0
0
I've never understood why people hate \n.
BTW, what are the replacements for the other escape codes (\t, \b, \a, etc?)





<< tiger correct. When you combine c and c++ sometimes the compiler craps itself. Especially when you have a huge program >>

What compiler are you using? As far as any compiler I've seen is concerned, C++ is simply a superset of C and includes all C stuff in it, so &quot;mixing&quot; shouldn't cause any problems