n C++, using STL algorithms, containers, or iterators, use the text file shoes.txt, where you want to sell a pair of shoes to a customer. The price must come from the text file, and can be used to get the total for any shoe the user may choose. Once the user gets the price of the shoes and buys them, that item must be removed from the textile shoes.txt.
In C++, using STL
CONSOLE
cout << "hello. what shoes do you want to buy";
cin >> heels;
cout << " that will be " shoe_price "! Do you want to buy them?Y/N";
cin >> Y;
cout << "Thanks for the purchase. Shop with us again soon.";
-------------------------------
heels are now removed from the text file.
The cout should return " That will be $20 ! " for the heels.
----------------------------------------------------
shoes.txt items:
heels $20
shoes $123
jordans $150
flats $25
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images