if (feof(fpList))
filename = "$";
else
filename = fread_word(fpList);
Like many things in C, the ternary operator can be abused. I've seen massively-nested ?:'s which, while amusing, were certainly unreadable. For more information, google for "ternary operator".
What they are saying is that a file *should* end with "$" but if it doesn't, in other words, if feof is true, then simulate that by putting a "$" into filename, otherwise read a filename from the file.
Then the subsequent test just tests for a "$" and doesn't have to test for end-of-file as well.
Hey everyone!
I was wondering if someone could give me a little more info as to what exactly the ? "$": does in the line
filename = feof( fpList ) ? "$" : fread_word( fpList );
This line is with
filename = feof( fpList ) ? "$" : fread_word( fpList );
if ( filename[0] == '$' )
break;
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.