class A { public: int* m_a; A(int x) { m_a = new int(x);} ~A() {delete m_a;} }; void f(A a) { cout<<a.m_a; } int main() { A a(1); f(a); }
f()
main()
m_a
Login in to like
Login in to comment
or Read more about C++ Quizzes
Login in to like
Login in to comment