You are on page 1of 1

12/31/23, 11:45 PM C++ Shell

C++ shell cpp.sh


cpp.sh
online C++ compiler
about cpp.sh

11 {
12 system("cls");
13 char choice;
14 string name;
15 int s, z;
16
17 cout << "Welcome to Burger Stop!" << endl<< endl;
18
19 cout << "MENU"<< endl<< endl;
20
21 cout <<item[0]<<"\n"<<"Price: P"<<a<<"\n"<<endl;
22 cout <<item[1]<<"\n"<<"Price: P"<<b<<"\n"<<endl;
23 cout <<item[2]<<"\n"<<"Price: P"<<c<<"\n"<<endl;
24 cout <<item[3]<<"\n"<<"Price: P"<<d<<"\n"<<endl;
25
26 cout << "Enter your order: ";
27 cin>>name;
28
29 for(int i = 0; i < 4; i++)
30 {
31 if (name != item[i])
32 {
33 cout << "Is this your final order? (Yes or No?)";
i h i
Link to this code: [copy]

compilation
main.cpp:36:18: warning: multi-character character constant [-Wmultichar]
if (choice == 'Yes' || choice == 'yes')
^
main.cpp:36:37: warning: multi-character character constant [-Wmultichar]
if (choice == 'Yes' || choice == 'yes')
^
main.cpp:38:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
break;
^
main.cpp:36:4: note: previous statement is here
if (choice == 'Yes' || choice == 'yes')
^
main.cpp:39:4: error: expected expression
else if (choice == 'No' || choice == 'no') // in my compiler theres an error of "multi-character constant"
^
main.cpp:36:34: warning: result of comparison of constant 7955827 with expression of type 'char' is always false [-Wtautological-constant-out-of-range
if (choice == 'Yes' || choice == 'yes')
~~~~~~ ^ ~~~~~
main.cpp:36:15: warning: result of comparison of constant 5858675 with expression of type 'char' is always false [-Wtautological-constant-out-of-range
if (choice == 'Yes' || choice == 'yes')
~~~~~~ ^ ~~~~~
5 warnings and 1 error generated.

C++ Shell 2.0 © cpp.sh 2014-2023 | buy me a coffe


old version still available here (for a limited time).

https://cpp.sh 1/1

You might also like