ishaiman 0 Newbie Poster

HI,
i am the student of MIT. C++ is my subject. I feel confusion in FUNCTIONS. can you help me?

It works if you get rid of getline(inFile, Library[i].genre); I didn't try it but it might have worked with inFile >>Library[i].genre, but mixing getlines and >> can cause trouble. The second argument to getline should be a string.

There are some problems in the addRecord method (you need to probably make a loop in the main method to get additional records and pass in the i value to addRecord and you need to declare albumName locally if you want to read into it.