Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void User::GetShoppingHistory()
- {
- ifstream output;
- string path = "Users\\";
- string buffer;
- string file;
- int Counter = 0;
- path += this->GetLogin() + "History" + ".txt";
- output.open(path, ios::in);
- if (output.is_open())
- {
- while (!(output.eof()))
- {
- output >> file;
- buffer += file + " ";
- Counter++;
- if (Counter % 16 == 0)
- {
- cout << buffer << endl;
- buffer = "";
- }
- }
- }
- else
- {
- cout << "This user has no the purchase history!" << endl;
- }
- output.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement