Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language, how to read command line parameters with argv and argc
C language, how to read command line parameters with argv and argc
L_o_o_n_i_e has been described in detail, except that argv is a character type. If you want to enter numbers, you need to turn them yourself.

c:\ & gt; Execute 1 1 1

If your program is called exec after compilation, the usage of your argv[ 1] in the previous line is "11". Just turn it with the atoi function.