Just polished it up a little, and fixed a few things. Take a look it will definitely help you to compare your original to this :
#include <iostream>
using namespace std;
class Calculator{
private:
int number1;
int number2 ;
public:
Calculator(){
number1 = number2 = 0;
}
Calculator(int input1 , int input2 ){
number1 = input1;
number2 = input2;
}
int addNumber(){
return number1 + number2;
}
int subtractNumber(){
return number1 - number2;
}
int divideNumber(){
if(number2 != 0)
return number1 / number2;
else return 0;
}
int multiplyNumber(){
return number1 * number2;
}
};
int main(){
int numberInput1 = 0;
cout << "Enter number 1: ";
cin >> numberInput1;
int numberInput2 = 0;
cout << "Enter number 2: ";
cin >> numberInput2;
Calculator t(numberInput1, numberInput2);
char userOperationChoice;
cout << "which operation would you like to perform? ";
cout << " , enter M for Multiplication, D for Division, A for addition or S for Subtraction:" << endl;
cin >> userOperationChoice;
switch (userOperationChoice) {
case 'a' :
cout << "the total is: " << t.addNumber() << endl;
break;
case 's':
cout << "the total is: " << t.subtractNumber() << endl;
break ;
case 'd':
cout << "the total is: " << t.divideNumber() << endl;
break;
case 'm':
cout << "the total is: " << t.multiplyNumber() << endl;
break;
}
cin.ignore( 256,'\n');
cin.get();
return 0 ;
}