Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1.  
  2.   Account a; //STRUCT- just a reminder.
  3.  
  4.  
  5.   string a;
  6.   ifstream myfile ("accounts.txt");
  7.   if (myfile.is_open())
  8.   {
  9.     while ( myfile.good() )
  10.     {
  11.       getline (myfile, a);
  12.       cout <<  a << endl;
  13.     }
  14.     myfile.close();
  15.   }
  16.  
  17.  
  18. ifstream input("accounts.txt");
  19. if (!input) cout<<"accounts.txt not found"<<endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement