hi i am dipali i am trying to store multiple objects in file but it will store only one object with the help of read & write function plz tell me solution.

Recommended Answers

All 2 Replies

hi i am dipali i am trying to store multiple objects in file but it will store only one object with the help of read & write function plz tell me solution.

Maybe you open the file so that it gets truncated every time, i.e. the mode parameter is wrong?
See http://www.cplusplus.com/reference/iostream/fstream/open.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.