There's a code. What happens when you try to compile it?
 class A{
      friend void f() { A o; }
      A() {}
      ~A() {}
}; 

int main() { 
    A*o = new A();
    f(); 
    return 0;
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes