title: Storing inputted strings in an array
body: <p>How do I store the inputted strings into an array?</p>
  
  <p>I hope someone would give me tips on how to store inputs in an array..</p>
  
  <p>I'd like to store items in an array.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()  {
  
      cout &lt;&lt; "MANG JUAN'S 10-DAHAN\n\n";
      cout &lt;&lt; "A - BALOT = 25.00\tD - KETCHUP = 50.00\tG - VINEGAR = 25.00\n";
      cout &lt;&lt; "B - CANTON = 20.00\tE - MAGGI = 15.00\tH - OIL = 70.00\n";   
      cout &lt;&lt; "C - NIDO = 100.00\tF - ALASKA = 60.00\tI - COKE = 10.00\n";
      cout &lt;&lt; "\nWOULD YOU LIKE TO PURCHASE? Y/N\n\n";
  
      int quantity;
      char item, addAnother, choice;
      double price, total, grandTotal;
  
      cin &gt;&gt; choice;
  
      if (choice == 'n' || choice == 'N') {
               cout &lt;&lt; "\n\nThank you.\n\n";
      } else if (choice == 'y' || choice == 'Y') {
             string numPref;
             int i = 1;
             while ( i &lt;= 10 ) {
                 switch(i) { 
                           case 1: numPref = "st";
                                   break;
                           case 2: numPref = "nd";
                                   break;
                           case 3: numPref = "rd";
                                   break;
                           case 4:
                           case 5:
                           case 6:
                           case 7:
                           case 8:
                           case 9:
                           case 10: numPref = "th";
                                    break;
                           default: cout &lt;&lt; "\n\nTHE SYSTEM EXCEEDED ITS LIMIT\n\n";
                 }
                 cout &lt;&lt; "\n\nPLEASE ENTER " &lt;&lt; i &lt;&lt; numPref &lt;&lt; " ITEM:\t";
                 cin &gt;&gt; item;
                 if( !cin ) {
                     cout &lt;&lt; "ENTER A - H ONLY..";
                 } else {
                 cout &lt;&lt; "HOW MANY?\t";
                 cin &gt;&gt; quantity;
  
                 switch(item) {
                          case 'a':
                          case 'A':
                          case 'g':
                          case 'G':
                               price = 25.00;
                               break;
                          case 'b':
                          case 'B':
                               price = 20.00;
                               break;
                          case 'c':
                          case 'C':
                               price = 100.00;
                               break;
                          case 'd':
                          case 'D':
                               price = 50.00;
                               break;
                          case 'e':
                          case 'E':
                               price = 15.00;
                               break;
                          case 'f':
                          case 'F':
                               price = 60.00;
                               break;
                          case 'h':
                          case 'H':
                               price = 70.00;
                               break;
                          case 'i':
                          case 'I':
                               price = 10.00;
                               break;
                 }
                 cout &lt;&lt; "PRICE PER ITEM\t" &lt;&lt; price &lt;&lt; endl;
                 total = quantity * price;
                 cout &lt;&lt; "TOTAL\t\t" &lt;&lt; total &lt;&lt; "\n\n";
                 grandTotal += total;
  
                 cout &lt;&lt; "ADD ANOTHER ITEM? Y/N" &lt;&lt; endl;
                 cin &gt;&gt; addAnother;
                     if ( addAnother == 'n' || addAnother == 'N' ) {
                        cout &lt;&lt; "\n\nPLEASE PAY: " &lt;&lt; grandTotal;
                        cout &lt;&lt; "\n\n";
                        break;
                     } else if ( addAnother == 'y' || addAnother == 'Y' ) {
                        cout &lt;&lt; i++;
                     } else { cout &lt;&lt; "INVALID INPUT.."; break;}
                     }
             }
      } else {
             cout &lt;&lt; "INVALID INPUT..\n\n";
      }
      system("PAUSE");
      return 0;
  }
  </code></pre>
  
  <p>I'm reviewing myself in C++, unfortunately I forgot how to store arrays.. </p>