Using While Loops With Arrays and Classes

Its asking me to write the code using a while loop to read in values to an array.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
   void Read()
   {
      string id;
      float  price;
      float  amount;
            
      cout << "Please enter your product id, unit price and amount of unit "
           << endl << "[id price amount] and enter X to finish:" << endl;
      // DO_5: use a while loop to read in sales objects to saleRecord array

     while (id != "X")
     {
        cin >> id >> price >> amount;
     }
     return ;
   }
and where is the array?
Topic archived. No new replies allowed.