May 31st, 2004 01:57 PM
Good Day. Learning "C" is like learning any other new language. It will take awhile, however well worth it. Since you are already going to use a *nix machine to learn on, guess what OS was used to invent and implement "C"? It was on the UNIX OS and Dennis Ritchie was the man.
Additionally, one of the best compilers ever made is gcc (IMHO), common to most *nix's distributions. So what should you learn before jumping into "C"? Don't be shy, jump right into it. Learn how your compiler will translate your code that you create into "machine language". Spend some time surfing the net and reading about "C". AO has many great threads with some hot examples of the language in practical use.
Here's your first program you can compile:
printf("AO is Cool!");
Connection refused, try again later.
June 2nd, 2004 04:45 PM
I dont wanna make a new form for this but i am gona use gcc as my compiler but how do you use it in a termail i can type it in and it will come up but how you tell it what file to compile and where to compile it to and stuff like that thanks.
June 2nd, 2004 10:36 PM
the command is as follows:
So if I had a source file called myfile.c and I wanted to make an executable called myfile (and no, it does not need .exe after it :P) I would do
gcc [source filename] -o [output filename]
There are other options that you can specify. If you type "man gcc" you will get something similar to a help page which will explain the syntax of the program and what all the switches for it do.
gcc myfile.c -o myfile
June 4th, 2004 05:53 AM
^^they have some good links at that site.
Just thought I'd add that to the discussion.