command line arguments

edited February 2007 in Internet & Media
Hello,
Does anybody know how to use command line arguments in c to ask the user to enter first name, last name, gender, and age.
Thanks. :confused:

Comments

  • jaredjared College Station, TX Icrontian
    edited February 2007
    one solution could be using scanf

    http://goforit.unk.edu/cprogram/c_016.htm
  • JBJB Carlsbad, CA
    edited February 2007
    look into argv.
  • jaredjared College Station, TX Icrontian
    edited February 2007
    Radeon_Man wrote:
    look into argv.

    yeah with scanf you would have to run the program and then you could make it prompt for the information

    using argv, as Radeon pointed out, you could do it all in one line
    executeapp jared atchison M 21
    /\ something like that!

    good luck and cheers :cheers3:
Sign In or Register to comment.