Im working on an assignment and have run into a proglem that I cant seem to fix. With the following code I get the following error.
"warning: passing argument 2 of strchr makes integer from pointer without a cast"
#include <stdio.h>
#include <string.h>
int main()
{
char buf[250];
char *chptr;
char *strptr;
FILE *fp;
fp = fopen("FILE1", "r");
fgets(buf, 250, fp);
while(!feof(fp)) {
chptr = strchr(buf, "\n");
*chptr = '\0';
strptr = strstr(buf, "=");
if(strptr != NULL) printf("%s\n",strptr+4);
else printf("%s\n",buf);
fgets(buf, 250, fp);
}
}