Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

use arguments like '-a' , '--help' , etc.

mr_jackmr_jack Member Posts: 11
Hello everybody!

How to use line argumet in simple C program?
I know that i can use argv[] strings, but i don't kown how to use them, for example, in a switch(){ case: } control...
Please help me!

Thank you very much!

Comments

  • XfactorXfactor Member Posts: 343
    : Hello everybody!
    :
    : How to use line argumet in simple C program?
    : I know that i can use argv[] strings, but i don't kown how to use them, for example, in a switch(){ case: } control...
    : Please help me!
    :
    : Thank you very much!
    :

    This is basic pointer use. You'll want to learn about using pointers.

    X
  • mr_jackmr_jack Member Posts: 11

    :
    : This is basic pointer use. You'll want to learn about using pointers.
    :
    : X
    :

    i have found a solution!
    They exist getopt() and getopt_long() function...
    Read the man page:

    man 3 getopt

    thank you!
Sign In or Register to comment.