-
Borland
Hi guys,
Ive just started using borland c++ 6 and im trying to work out how to compile and run a C file. I used to use cygnus which has a command line with gcc.
I cant seem to run and C files on borland. Ive tried various search engines but they've return garbage.
THanks
-
isnt there a built in compile/run button for C files?
or do u have to compile in command prompt separetly
-
Quote:
Originally posted by Salem
> isnt there a built in compile/run button for C files?
Yeah the same one you press to compile C++
You just name your files to be prog.c rather than prog.cpp
Create console / command line programs with .c and .cpp files for the following program, and run the results.
Code:
#include <stdio.h>
int main ( ) {
printf( "This was compiled using a %s compiler\n",
sizeof('c') == 1 ? "C++" : "C" );
}
Just a question; Isn't it theoretically possible to have an implementation where sizeof(int)==1, CHAR_BITS will have to be more than 8 in this case given the range of values an int is supposed to have.