C++ problem
±z¬O²Ä
663ÓÂsÄýªÌ
have a newbie C++ competition coming up this Monday, and i had cameacross this C++ practice problem. i wonder if anyone of ya expertscould help me.
here is the question:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*create an input files with the name of the merchandises; the price; the manufacturer and the quantity remainning in stock.
*Output all the inventory records with the manufacturer whown first,followed by the name of the merchandise, price, quantity, totalquantity of all merchandises, and the total price of all.
*hint: use "file", "structure", and "for loop"
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sample Input:
Hammer 11.99 Stanley 22
Paint 18.59 Walltec 54
Saw 8.56 Crutrite 3
Bulbs 5.99 GE 18
sample Output:
Stanley Hammer $11.99 22
Walltec Paint $18.59 54
Crutrite Saw $8.56 3
GE Bulbs $5.99 18
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
I am confuse about how to insert multiple datas from a file using loop.
I will be appreciated if someone give me a sample solution.
Thankyou!!
¹ê¥Î¬ÛÃö·j´M: ua av it stock dc pet