I am basically passing two parameters in the private class and I am trying to access these two parameters in my main function. Since I made those two parameters private, I am using get and set functions to access these parameters, but I am not able to return two values from the get function. Please help me. The last post that asked kind of same question, but this time it has been asked for object oriented concept.
class FirstClass{
public:
void setName(int x,int y){
a = x;
b = y;
}
int getName(){
return a,b;
}
private:
int a,b;
};