我对 C++ 很陌生。这就是我目前正在处理的内容,我想你可以猜到我试图应用于程序的逻辑,以便它可以工作。我需要用户提供要执行的算术,如果它是某个将数字相加的算术。这是代码:
#include <iostream>
#include <string>
using namespace std;
int main()
{
int x;
int v;
int sum;
string input;
cout << "Choose arithmetic: addition or subtraction? " << endl;
cin >> input;
if(input=='Addition'||input=='addition')
{
int first;
int second;
int sum = first+second;
cout << "Enter the first number: " << endl;
cout << "Enter the second number: " << endl;
cout << "The sum of these numbers is: " << sum << endl;
}
return 0;
}
编译器给我以下错误: 13错误:'input == 1953066862'中的'operator =='不匹配
先感谢您!