Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- infile.open("songlist.txt");
- //open the text file created from the buy module and display
- while (!infile.eof())
- {
- getline(infile, songname);
- cout << "|" << left << setw(50) << songname << "|" << setw(15) << price << "|" << endl;
- total++;
- }
- infile.close();
- totalprice = total * price;
- cout << fixed << setprecision(2);
- //display the total price
- cout << "|------------------------------------------------------------------|" << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement