main function

This is a discussion on main function within the C Programming forums, part of the General Programming Boards category; I could not understand "main(int argc, char **argv)" what the two arguments mean and ** before argv. please help. sib....

  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,528
    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 09: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, 03: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-30-2005, 12:21 AM
  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, 01:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21