jump to case label c++
put everything in the case x: under {} brackets
metti tutto quello nel case x: sotto le parentesi {}
jump to case label c++
put everything in the case x: under {} brackets
metti tutto quello nel case x: sotto le parentesi {}
error jump to case label
switch (choice)
{
case 1: get_two_numbers(x, y);
//* vv here vv *
int sum = add(x, y);
//* ^^ here ^^ */
cout << x << " + " << y << " = " << sum << endl;
break;
case 2: get_two_numbers(x, y);
//* vv here vv */
int diff = subtract(x, y);
//* ^^ here ^^ */
cout << x << " - " << y << " = " << diff << endl;
break;
default:;
}
error jump to case label
switch (choice)
{
case 1:
{
get_two_numbers(x, y);
int sum = add(x, y);
cout << x << " + " << y << " = " << sum << endl;
}
break;
case 2:
{
get_two_numbers(x, y);
int diff = subtract(x, y);
cout << x << " - " << y << " = " << diff << endl;
}
break;
default:
break;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us