I'm having a bit of a formatting error. I've written a program that reads in from file or keyboard and prints out to a new file. Unfortunately I'm getting a blank entry before the proper stuff prints, with normal strings like "," or endls being printed but not the actual interesting stuff. Not sure what's going on here so I'd appreciate any help. Here's a copy of my read method, not sure how helpful it'll be. Personally I don't see anything wrong (of course not, otherwise I wouldn't be asking for help ).

void Student::write(ostream &file)
	file << "WORK??";
	file << name.getFirst() << " ";
	file << name.getMiddle() << " ";
	file << name.getLast() << endl;
	file << address.getStreet() << " ";
	file << address.getCity() << " ";
	file << address.getState() << " ";
	file << zip.GetString() << endl;
	file << id.GetString() << endl;
	file << area.GetString() << "-";
	file << phone.GetString() << endl;
So, my output file would look like this, whether I enter from keyboard or from a file.



WORK??my name is
streetname thiscity mystate 11111

As for my read from keyboard method, here's a tiny bit (I just copied the first few lines as it's a pretty ugly method):
int Student::keyRead()
	int endOfFile = 0;
	string s;

	cout << "Please enter first name or type -1 to quit: ";
	cin >> s;
	if (s == "-1")
		endOfFile = -1;

		cout << "Please enter middle name: ";
		cin >> s;
		cout << "Please enter last name: ";
		cin >> s;
etc. & etc.
Basically my read from file is the same, just modified.

(My Student constructor is declared but at the moment empty.)

Any suggestions?? I'm probably missing something really obvious, aren't I?
Thanks in advance, smart folks!