Thread: main function

  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    1

    main function

    I could not understand "main(int argc, char **argv)" what the two arguments mean and ** before argv. please help.
    sib.

  2. #2
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    Have a look at this.

    Edit:

    Steve Summit does not appear to address that particular form of declaration of main (At least not explicitly). Therefore, keep in mind that,

    Code:
    int main(int argc, char **argv)
    Is a variation of:

    Code:
    int main(int argc, char *argv[])
    They do the same thing.
    Last edited by kermit; 08-20-2010 at 08:12 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM