#include
using namespace std;
int main() {
char choice;
int solution, num1, num2;
cout << \"Menu\";
cout << \"\\n========\";
cou
cin >> num1, num2;
This syntax is not correct for what you want. To chain, use
cin >> num1 >> num2;
If you compile with warnings you'll get notified about this by the compiler
int a{}, b{};
std::cin >> a, b;
gives the error:
warning: right operand of comma operator has no effect [-Wunused-value]
std::cin >> a, b;
The whole statement is parsed as
((std::cin >> a), b);
Which consists of two comma-separated expressions. The b
in that case doesn't have any effect. If you print the variables after the std::cin
line above, you will always get 0
for b