do {
cout << "Quantity : ";
cin >> sale->quantity;
cout << "Unit Price: ";
cin >> sale->unitPrice;
cout << "Taxable : ";
cin >> sale->taxStatus;
} while (sale->quantity != 0);
に入る0とquantity、それでもとを要求され、unitPrice終了taxStatusします。quantity入力するとすぐにループを終了させるにはどうすればよい0ですか?
編集
> echo "" | a.out
Sale Records
=============
Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : Quantity : Unit Price: Taxable : >