somevar
hello
class A { private: int somevar; int hello; public: A(int a, int b):somevar(a), hello(b) {} //1 }; //0 int main() { A Ob(4,5); //2 return 0; }
std::cout << Ob.somevar << Ob.hello;
std::cout << Ob.getVar() << Ob.getHel();
std::cout << Ob;
Login in to like
Login in to comment
or Read more about C++ Quizzes
Login in to like
Login in to comment