PDA

View Full Version : I feel stupid



Na2uRITS
11-16-2000, 05:05 PM
int argc, char** argv

in the following declaration what does a double star mean ?? I know 1 is pointers but two ?!?

11-16-2000, 05:35 PM
every * means a pointer so ** is a pointer to a pointer...

Rob The Bloke
11-17-2000, 02:30 AM
int argc : The number of command line arguments when the program was run

char** argv : an array of strings, each string being one of the arguments

ie, running a program like such....

Program -f

argv[0] will be a pointer to the start of the string "Program"

argv[1] will be a pointer to the start of the string "-f"

umount
11-19-2000, 12:15 PM
It's the same like "char* argv[]"

you see ?? ;-))