What to learn before C/C++? - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: What to learn before C/C++?

  1. #11
    Senior Member
    Join Date
    Dec 2003
    Location
    Pacific Northwest
    Posts
    1,675
    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.

  2. #12
    Member
    Join Date
    Oct 2003
    Posts
    50
    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.
    EHU

  3. #13
    Custom User
    Join Date
    Oct 2001
    Posts
    503
    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

  4. #14
    Senior Member
    Join Date
    Feb 2004
    Posts
    620
    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
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides