Thread: **argv

  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
    428
    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.
    Virtual reality hello world http://www.rodneybrothers.com/vr/vrh...rld/index.html in html and javascript.
    Viewable with dodocase, google cardboard, OR, and other compatible VR gear.

  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, 12:16 AM
  3. Question on *argv vs. *argv[]
    By movl0x1 in forum C Programming
    Replies: 3
    Last Post: 05-29-2007, 06:03 PM
  4. argv
    By Brian in forum C Programming
    Replies: 1
    Last Post: 01-26-2002, 05:55 PM