Guest User

Untitled

a guest
Jan 23rd, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. void Account::read_rec()
  2. {
  3. std::ifstream infile;
  4. infile.open("record.bank", std::ios::binary);
  5. if (!infile)
  6. {
  7. std::cout << "[Error] File Not Found!" << std::endl;
  8. return;
  9. }
  10.  
  11. std::cout << "n***** Data from file *****" << std::endl;
  12.  
  13. while (!infile.eof())
  14. {
  15. if (infile.read(reinterpret_cast<char*>(this), sizeof(*this) > 0))
  16. {
  17. show_data();
  18. }
  19. }
  20. infile.close();
  21. }
Add Comment
Please, Sign In to add comment