Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

free C compiler

Status
Not open for further replies.
Jun 30, 2003
196
GB
Hi im just starting out with c and want a compiler that just interpretes a notpad document and converts it into a exe. I have windows me and dos. Can anyone point me in the direction of a free compiler and also if it is hard to install and use give me some advice.
 

These are pretty good, and easy to install
- Borland C++ Compiler 5.5
- Bloodshed Dev-C++

DJGPP is another one I use from time to time, but its a bit more fiddly to install (lots of zips rather than one install.exe), but it does mean you can pick and choose the bits which interest you.

Despite them saying C++, they're also C compilers. But if you're interested in learning C, then its important to make sure they're in 'C' mode and not 'C++' mode. You don't want to be learning some C++ by mistake.

The normal convention is that a C program would be called prog.c, and a C++ program would be prog.cpp.

Code:
#include <stdio.h>
int main ( ) {
#ifdef __cplusplus
    printf( &quot;This is compiled with a C++ compiler\n&quot; );
#else
    printf( &quot;This is compiled with a C compiler\n&quot; );
#endif
    getchar();
    return 0;
}
Save this with .c and .cpp extensions, and compile and run the resulting program to see what I mean.
 
That is very helpfull, one last thing: can i find these compilers free on the internet at all

 
Did you miss the &quot;free compilers&quot; link I gave you?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top