O
oogie
Hi,
The arguments to main are usually passed as char* argv[] or char **
argv, where for this example argv is the array of arguments. What I
don't understand is how accessing the actual argument value evaluates
to the following:
int main(int argc, char** argv)
{
char ch = argv[0];
}
or
int main(int argc, char *argv[])
{
char *ch = argv[0];
}
I do get the logic behind the latter case, but char** argv really
puzzles. Any help would be appreciated.
The arguments to main are usually passed as char* argv[] or char **
argv, where for this example argv is the array of arguments. What I
don't understand is how accessing the actual argument value evaluates
to the following:
int main(int argc, char** argv)
{
char ch = argv[0];
}
or
int main(int argc, char *argv[])
{
char *ch = argv[0];
}
I do get the logic behind the latter case, but char** argv really
puzzles. Any help would be appreciated.