Hi guys. I know that I'm supposed to use argc and *argv[] to find the number and contents of the command line.
But help me think this through... if i have a program executable named "prog1" and I have options such as -v and -p , both of which are supposed to be followed by integers telling me how large of an array I should make, how should I go about reading this input?
example command line:
% prog1 -v 32 -p 16
thanks. I haven't programmed in C in a while now.
But help me think this through... if i have a program executable named "prog1" and I have options such as -v and -p , both of which are supposed to be followed by integers telling me how large of an array I should make, how should I go about reading this input?
example command line:
% prog1 -v 32 -p 16
thanks. I haven't programmed in C in a while now.