invalid initializer

I have an error in line 11, "invalid initializer". Any suggestions?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
    int SIZE=5;
    double COFFEEPRICE=2.00;
    string products[5]="Whipped Cream"; "Cinnamon"; "Chocolate Sauce"; "Amaretto"; "Irish Whisky";
    double prices[5]=0.89; 0.25; 0.59; 1.50; 1.75;
    double totalPrice=0;
    int choice=0;
    int SENTINEL=-1;
    
    while(choice!=-1)   
         cout<<"Please select an item from the Product menu by selecting the item number (1 - 5)  or -1 to terminate: "<<endl;
         cout<<"Product		   Price ($)"<<endl;
         cout<<"=======		   ========="<<endl;
         cout<<"1. Whipped cream     0.89"<<endl;
         cout<<"2. Cinnamon          0.25"<<endl;
         cout<<"3. Chocolate sauce   0.89"<<endl;
         cout<<"4. Amaretto          1.50"<<endl;
         cout<<"5. Irish whiskey     1.75"<<endl;
         cout<<"Please enter a positive number: "<<endl;
         cin>>choice; 
              if(choice!=-1)
              {
                   if((choice>=1)&&(choice<=5))
                   {
                   totalPrice=totalPrice+prices[choice-1];
                   cout<<"Item number "<<choice<<": "<<products[choice-1]<<" has been added"<<endl;
                   }
                   else
                   { 
                   cout<<"Item number "<<choice<<" is not valid"<<"Sorry we do not carry that item"<<endl;
                   } 
              }    
         cout<<"Total price of order is "<<totalPrice<<endl;
         cout<<"Thanks for purchasing from Jumpin Jive Coffee Shop"<<endl;

system("PAUSE");
return 0;
}
closed account (DSLq5Di1)
Arrays are initialized with curly brackets and comma separated values.

1
2
    string products[5]= { "Whipped Cream", "Cinnamon", "Chocolate Sauce", "Amaretto", "Irish Whisky" };
    double prices[5]= { 0.89, 0.25, 0.59, 1.50, 1.75 };
Thanks! There was another problem I ran into as well, I didn't open and close my while function x) Also, the psuedocode was given to us by our teacher, and this program does not include the coffee price in the total price. What is a good way to go about adding the coffee price, once, to the total price?
closed account (DSLq5Di1)
Outside of the while loop, add the price of coffee to your total.
Awesome! You've been a big help man. /solutesloppy
Topic archived. No new replies allowed.