int strstr(char *haystack, char *needle) { int i = 0; while (haystack[i] != needle[0] || haystack[i] != '\0') { i++; } if (haystack[i] == '\0') { return NULL; }
Standard input is empty
prog.cpp: In function ‘int strstr(char*, char*)’: prog.cpp:10: error: ‘NULL’ was not declared in this scope prog.cpp:11: error: expected `}' at end of input
Standard output is empty