This code should work, but it doesn't:
When I try to compile it I get this:
fp = fopen("text.txt","r");
fgets(buf, 100, fp);
pos = strchr(buf, '~');
printf("Character '~' found at position %d.\n", pos - buf);
warning: incompatible implicit declaration of built-in function 'strchr'.
What's wrong with the code?
Thanks in advance for help
Have you included string.h header?
hurray :) The string header worked