Profile

Join date: Jul 25, 2022

About

Error jump to case label Code Answer's

While the error jump to the case label is a great feature, it can also be a bit confusing. You may have noticed that the compiler will jump to the line with the closest match of your previous source code. The line you've just added to your program doesn't match anything in your previous source code, so then it jumps to that line.

jump to case label c++ 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:; }
c

codeprozonebyabakhsh

More actions