command line arguments

This is a discussion on command line arguments within the C Programming forums, part of the General Programming Boards category; BEN10, "command line" is simply user input at a text-based terminal... before fancy windows interfaces were invented. When you just ...

  1. #16
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,832
    BEN10, "command line" is simply user input at a text-based terminal... before fancy windows interfaces were invented. When you just type the name of the program at a prompt. The program's parameters (or arguments) are entered in following the program name.

    testprog hello 12 -Q

    would execute the program "testprog" and pass it "hello", "12", and "-Q". These parameters are available in the program: number of parameters is in the variable argc and the values are in the argv array.

  2. #17
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Sort of. In Windows you can add command line arguments to the shortcut of whatever you've got set up to run.

    Quzah.
    Hope is the first step on the road to disappointment.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 02:17 AM
  2. GradeInfo
    By kirksson in forum C Programming
    Replies: 23
    Last Post: 07-16-2008, 04:27 PM
  3. command line arguments
    By vurentjie in forum C Programming
    Replies: 3
    Last Post: 06-22-2008, 07:46 AM
  4. NULL arguments in a shell program
    By gregulator in forum C Programming
    Replies: 4
    Last Post: 04-15-2004, 11:48 AM
  5. registry, services & command line arguments.. ?
    By BrianK in forum Windows Programming
    Replies: 3
    Last Post: 03-04-2003, 02:11 PM

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