function is x/y+z means (x/y)+z
if you dont write to Z anything
program says "ERROR: Operator-operand imbalance."
program is that as it is above
and my code is
#include <iostream>
using namespace std;
class Calculator
{
int x,y,z;
public:
void arith_ex(int,int,int);
};
void Calculator::arith_ex(int x,int y,int z)
{
cout<<"X="<<endl;
cin>>x;
cout<<"Y="<<endl;
cin>>y;
cout<<"Z="<<endl;
cin>>z;
if(z==' ')
{cout<<"ERROR: Operator-operand imbalance."<<endl;
}
cout<<"Sonuc="<<x/y+z<<endl;
}
int main()
{
Calculator hesap;
hesap.arith_ex(int x,int y ,int z); //expected primary expression before 'int'//
return 0;
}
ERRORS--> error C2144: syntax error : missing ')' before type 'int'
error C2660: 'arith_ex' : function does not take 0 parameters
error C2059: syntax error : ')'