command line args

This is a discussion on command line args within the C Programming forums, part of the General Programming Boards category; ->How do I access command-line arguments?...

  1. #1
    Prakash
    Guest

    Smile command line args

    ->How do I access command-line arguments?

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    Code:
    
    int main(int argc,char* argc[])
    {
        for(int i = 0;i < argc;i++)
        {
             printf("%s\n",argc[i]);
        }
        return 0;
    }
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointer confusion
    By Blackroot in forum C++ Programming
    Replies: 11
    Last Post: 09-12-2007, 01:44 AM
  2. Replies: 2
    Last Post: 10-24-2005, 02:32 PM
  3. Replies: 1
    Last Post: 06-29-2004, 06:23 PM
  4. Multiple Command Line Args
    By mart_man00 in forum C Programming
    Replies: 10
    Last Post: 08-16-2002, 03:15 PM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM

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