What does
*++*argv
do? I am going through some confuscated code and this didn't make
sense to me. I couldn't find any references to using pointers with
incrementors. Thanks.
You should tell us the type of argv.
Usually you use argv as a parameter of main():
int main (int argc, char **argv)
{
....
}
So, I will assume that argv is declared as pointer to a pointer to char.
Well, so what is '*argv'? It is a pointer to char, i.e. it could point
to a string. Let us assume it does. Then '++(*argv)' is increasing the
pointer to the next char. '**argv' would be the first character of the
string '*argv' points to. So, '*(++(*argv))' is the character '*argv'
points to _after_ being increased by one. Example
char *mystring = "Hello, world";
char **argv = &mystring;
Then, printf("%c",*++*argv); would give you 'e'.
Cheers
Michael