**argv

This is a discussion on **argv within the C++ Programming forums, part of the General Programming Boards category; I've noticed when reading through some winAPI tutorials. May I ask why there's two * instead of just one?...

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    30

    **argv

    I've noticed when reading through some winAPI tutorials. May I ask why there's two * instead of just one?

  2. #2
    Bored Programmer
    Join Date
    Jul 2009
    Location
    Tomball, TX
    Posts
    407
    Basicly its an array of strings where the int is the number of strings and argv stores the strings. I can be written as char** argv or char* argv[]. As far as I have read.

    This is so you can accept command arguments in your program as is a common feature in Unix terminals. A common example would be that your linkers and warning levels can be passed to the compiler like this in Unix.

    I am sure there may be more to it but that is as far as I have read.
    Last edited by Lesshardtofind; 01-02-2013 at 11:59 PM.

  3. #3
    Registered User
    Join Date
    Oct 2012
    Posts
    30
    Ah, can't believe I missed that. Thanks for the quick & helpful reply.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with argv
    By waterborne in forum C Programming
    Replies: 4
    Last Post: 01-24-2010, 07:56 PM
  2. main() ; argv[1] = string at argv[0]???
    By UCnLA in forum C Programming
    Replies: 1
    Last Post: 03-31-2008, 01:16 AM
  3. Question on *argv vs. *argv[]
    By movl0x1 in forum C Programming
    Replies: 3
    Last Post: 05-29-2007, 07:03 PM
  4. argv
    By Brian in forum C Programming
    Replies: 1
    Last Post: 01-26-2002, 05:55 PM

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