Complete the following code segment as instructed:
class CPP{
int a, b;
public:
CPP (int x, int y){
a=x;
b=y;
}
void show(){
cout<<a<<" "<<b;
}
};
int main(){
/* create an object for the class and display the values of the private variables
*/
}
Answers
Answered by
1
int main()
{
CPP obj1(3,4);
obj1.show();
return 0;
}
Similar questions