Trying to use the following unsuccessfully...This is the argument for an if statement....if 0 do ....Can someone tell me what I may be doing wrong here as I never enter it....*p = "ER_CMD#P?"
Code:(!(strncmp(*p, "ER_CMD", 6)))
Trying to use the following unsuccessfully...This is the argument for an if statement....if 0 do ....Can someone tell me what I may be doing wrong here as I never enter it....*p = "ER_CMD#P?"
Code:(!(strncmp(*p, "ER_CMD", 6)))
I'm the author of MiniBasic: How to write a script interpreter and Basic Algorithms
Visit my website for lots of associated C programming resources.
https://github.com/MalcolmMcLean
what I may be doing wrong here*pC library function - strncmp() - TutorialspointCode:#include <stdio.h> #include <string.h> int main() { char *string1 = "test"; if ( !strncmp(string1, "test", strlen(string1)) ) { printf("equal."); } else { printf("unequal!"); } return 0; }
Last edited by Structure; 06-27-2020 at 10:06 AM.
"without goto we would be wtf'd"