Is that the normal format?Code:strstr(char* dest, char* src){ }
Cheers
Is that the normal format?Code:strstr(char* dest, char* src){ }
Cheers
What about the return result?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
This is giving me a comparison between integer and pointer warning.
How must I put the truth value? Like...what are the return parameters or something I can check to see if the substring exists?Code:if (strstr(node->name, command) == 1){ curr = node; printf("%s\n", curr->name); }
Cheers
Nvm, the return value is == 0 I see.
solved
The return value is a char* pointer to the match, or NULL.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.