idk why but i cannot figure out what is wrong with my program. i found it crashes on strcmp but as far as i can tell this is how i have always used it. i'll post what i think are the impotent parts.
Code:
FILE* fin; //file pointer
fin = fopen("profiles.data", "r"); //open file
if(fin == NULL)
{
printf("ERROR opening file\n");
return -1;
}
char* input = ""; //input form file.
fscanf(fin, "%[^\n]", &input); //read line
//initialize data liked list
initializeData(); //<----dont think this matters it never touches input or anything else
printf("%s ?= **\n", &input); //<----this works
//look for start of file. start of file will contain "**" on a single line by it self.
while(strcmp(input, "**") != 0) //<---crashes here
{
fscanf(fin, "%[^\n]", &input);
}
//more to do after this...
EDIT fixed =! to !=. this was right in my code just wrong here.