Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Account::read_rec()
- {
- std::ifstream infile;
- infile.open("record.bank", std::ios::binary);
- if (!infile)
- {
- std::cout << "[Error] File Not Found!" << std::endl;
- return;
- }
- std::cout << "n***** Data from file *****" << std::endl;
- while (!infile.eof())
- {
- if (infile.read(reinterpret_cast<char*>(this), sizeof(*this) > 0))
- {
- show_data();
- }
- }
- infile.close();
- }
Add Comment
Please, Sign In to add comment