checking if a file is empty
ok, i have a program that checks to see if a .txt file exists, and, if not, creates the file. this file needs to be used by multiple instances of the program running simultaneously. each instance of the program uses this file to read in data to a linked list. however, if the file exists but has no text (this happens when one instance just created the file but hasn't added any text yet and a second instance starts up), the second instance tries to read from the empty file and crashes. i have a while loop - while ( !reader.eof() ) - that i didnt think it would enter: i thought that an empty file would immediately trigger the eof() and the program would just skip the loop..... apparently not. can anyone help?