Reading line by line from Binary file

Hi, first post here. I am having issue with assigning a binary file line by line to objects of a class I made. Essentially its a class of SOng that has Song, artis, and size of song.
EC: Yesterday Beatles 7
Footloose Kenny Logins 3

Once done i need to overload my operators to compare the object of my SOng class, named s1 and s2.

THis is what i have so far, but I know I'm wrong since using Binary Files

void tsuPod::sortSongList()
string songInfo;
while (file.peek() != eof);
if (file.peek() == eof)
while( getline( file, songInfo )
While (songInfo != '\n')
s1 = songInfo ;

if (file.peek() == '\n')
int curPos = (file.cur)
//count the number of lines read and do another while loop to read next line

I am NOT looking for perfect code, I want to figure this out for myself, I just need a little help and a point in the write direction. THanks Guys!
The code posted is an incomplete fragment,it isn't clear what it is trying to do.

The important question, is how is the class SOng defined, what data members does it have?
And pls state any errors the compiler/linker is giving you.

Topic archived. No new replies allowed.