Hi,
Totally new to C, trying to get input from the user, check if contains a substring, and alert the user if it does. Apparently there is no regex stuff which makes me very sad (almost as sad as the C error message help). I keep getting passing arg 1 of 'strstr' makes pointer from integer without a cast. I have no integers anywhere and after 3 hours of trying to fix this I'm ready to toss my computer out the window and become a beat farmer. Does anyone have any idea what is going on? The error is in the checkString method near the bottom of the code.
Thanks
Code:#include <stdio.h> #include <string.h> void checkString(char c); int main() { char c = getchar(); while (c != EOF) { checkValue(c); c = getchar(); } return(0); } void checkString(char c) { char *cPointer; cPointer = strstr(c, "lb"); if (cPointer != null) { puts("Input contains lb"); } }