Forum Discussion
Altera_Forum
Honored Contributor
16 years agoIn other words, I can't get into the if:
int x; char list[30]= {"ABCOCJHAKLSDNJCDKLASNC"}; FILE *fd; if( (fd = fopen("a.txt", "w+t")) != NULL) { x = fwrite(list, sizeof(char), 12, fd); fclose(fd); } if( (fd = fopen("a.txt", "r+t")) != NULL) { x = fread(list, sizeof(char), 12, fd); fclose(fd); }