Hi, me again. Well, first of all, big thanks to AceOfSpade19 for clearing that up to me.
Second of all, thank you ALI INAM for trying to help me, however next time try putting the [.code=c++][./code] tags.
And third of all, I'm still stuck. Here's how the Main Program part looks like currently.
//Main program:
for (;;) {
do {
cout << "1 - Addition." << endl;
cout << "2 - Subtraction." << endl;
cout << "3 - Multiplication." << endl;
cout << "4 - Division." << endl;
cout << "5 - Abimees." << endl;
cin >> choice; }
switch (choice) {
//Addition.
Now, that was the default Main Code. If I add the "while" command to it like this,
//Main program:
for (;;) {
do {
cout << "1 - Addition." << endl;
cout << "2 - Subtraction." << endl;
cout << "3 - Multiplication." << endl;
cout << "4 - Division." << endl;
cout << "5 - Abimees." << endl;
cin >> choice; }
while (choice < 1 || choice > 5) {
break; }
switch (choice) {
//Addition.
Then it will get me this error.
error C2143: syntax error : missing ';' before '{'
If I follow the error, and put it like this,
//Main program:
for (;;) {
do {
cout << "1 - Addition." << endl;
cout << "2 - Subtraction." << endl;
cout << "3 - Multiplication." << endl;
cout << "4 - Division." << endl;
cout << "5 - Abimees." << endl;
cin >> choice; }
while (choice < 1 || choice > 5); {
break; }
switch (choice) {
//Addition.
It will compile "succesfully" but the script is broken, if I enter any number/letter and press Enter it will exit immediately... Right..
I also tried to make it like this.
//Main program:
for (;;) {
do {
cout << "1 - Addition." << endl;
cout << "2 - Subtraction." << endl;
cout << "3 - Multiplication." << endl;
cout << "4 - Division." << endl;
cout << "5 - Abimees." << endl;
cin >> choice; }
while (choice < 1 || choice > 5)
break;
switch (choice) {
//Addition.
However, that didn't help much, because I get this error.
syntax error : missing ';' before 'break'
Well, I'm stuck... Again.. Would be nice if anyone would told me what to do... Well, would be even better, if I would be told what to put in the "while" statement...