You can obtain a few version of a c/c++ compiler from http://gcc.gnu.org/, but if you are using http://www.designersoft.co.uk/linux.html then you should have the compiler already installed.
To display the classic Hello World, save this code below
----
#include <stdio.h>
int main(void)
{
printf("Hello world!!");
}
----
as helloworld.c
Then to compile (if using gcc) into the platform that you are using
gcc helloworld.c -o helloworld
to run the program, you just need to execute the helloworld file that was created from the above command, if you are using Windows, then you will need to change the line to
gcc helloworld.c -o helloworld.exe
since Windows prefers to have the *.exe at the end of the filenames.
The output should be
Hello world!!
Well that is the classic!! |