Hi mindwaves,
You're certainly busy coding these days, eh? :-)
Is it the case that the 'new.c' file is empty whenever you enter data for more than one student, but it has the expected contents (minus the headings) if there's just one student? If so, the problem might be that the 'fout' filestream is being accidentally opened more than once. [C++ won't write to a filestream that's "too open"; basically, on the second open, an internal 'failbit' gets set, which wouldn't affect the 'is_open()' method but would cause any subsequent '<<' operations to fail.]
Currently, the two statements which open the 'fout' filestream and test its success [i.e., the 'fout.open(...);' and 'if(!fout.is_open()) ...;' statements] are located within the read-loop, which would cause them to be executed more than once, if the number of students is greater than one. To make a long story short, try moving those two statements outside of the read-loop.
Regards,
--Paul