Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Simple file input question? (http://www.go4expert.com/forums/simple-file-input-question-t4233/)

LeighRogers 9May2007 01:01

Simple file input question?

if (myfile.is_open())
    while (! myfile.eof() )
      for(int b=0;b<PlayListLength;b++)
      getline (myfile,line);
      Title = line;
      getline (myfile,line);
      Artist = line;
      getline (myfile,line);
      Length = line;
      Playlist[b] = new Mp3(Title, Artist, Length);

To read from a file and use three lines at a time to create a new mp3 within an array. I need the third value (Length) to be read as an int instead of a string.

Can anyone help?!

Thank you very much.

Leigh Rogers

All times are GMT +5.5. The time now is 03:46.