- #1
zeion
- 466
- 1
Hi,
I don't understand how this can be so difficult.
So I have a [char ** ptr] pointer that stores a list of arguments.
I'm able to PRINT each of them by doing printf("%s\n", ptr)
But how the heck do I is strcmp to see if a certain argument is there?
Apparently I cannot just do [if (strcmp(ptr, 'a') == 0].
I don't understand what strcmp needs for it to work. Do I need one star? Two stars? Five stars? Why is this so hard?
Thanks
I don't understand how this can be so difficult.
So I have a [char ** ptr] pointer that stores a list of arguments.
I'm able to PRINT each of them by doing printf("%s\n", ptr)
But how the heck do I is strcmp to see if a certain argument is there?
Apparently I cannot just do [if (strcmp(ptr, 'a') == 0].
I don't understand what strcmp needs for it to work. Do I need one star? Two stars? Five stars? Why is this so hard?
Thanks