I am new to C++, and decided to make a simple calculator to help myself learn. I am having trouble adding a non-integer variable to the problem (in this case, a plus sign). How should go about doing this?
Here is the code:
#include <iostream>
using namespace std;
int main()
{
char problem;
int result;
int a;
int b;
cin >> a;
cin >> problem;
cin >> b;
result=a && problem && b;
cout << result << endl ;
return 0;
}