-
May 31st, 2004, 01:57 PM
#11
EHU,
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:
#include <stdio.h>
int man(void)
{
printf("AO is Cool!");
return 0;
}
/*Have Fun!*/
Connection refused, try again later.
-
June 2nd, 2004, 04:45 PM
#12
Member
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
#13
the command is as follows:
Code:
gcc [source filename] -o [output filename]
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
Code:
gcc myfile.c -o myfile
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.
ac
-
June 4th, 2004, 05:53 AM
#14
www.programmingtutorials.com
^^they have some good links at that site.
Just thought I'd add that to the discussion.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|