Guest User

Untitled

a guest
Aug 18th, 2019
72
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. infile.open("songlist.txt");
  2.  
  3. //open the text file created from the buy module and display
  4. while (!infile.eof())
  5. {
  6. getline(infile, songname);
  7. cout << "|" << left << setw(50) << songname << "|" << setw(15) << price << "|" << endl;
  8. total++;
  9. }
  10. infile.close();
  11.  
  12. totalprice = total * price;
  13.  
  14. cout << fixed << setprecision(2);
  15.  
  16. //display the total price
  17. cout << "|------------------------------------------------------------------|" << endl;
RAW Paste Data