So i have a while loop to read comments off a text file as follows. There could be things after the comments so that shouldn't be ruled out. Here is my code as follows:
int i = 0;
while(!feof(fd) || i < 100) {
fscanf(fd, "#%s\n", myFile->comments[i]);
printf("#%s\n", myFile->comments[i]);
getch();
i++;
}
Comment format:
# This is a comment
# This is another comment
Any idea why it only returns the first character?
EDIT:
Here is my comments array:
char comments [256][100];