Hi, With below code: class A { } class B { public: ref A createA() // q2:without type name A is also OK? { return new A;//q1 }
} My questions are: q1.why this can't work? q2.I can understand below code works: A createA(){return new A;} but why this one also works? ref createA(){return new A;} // no return type A? Thanks so much for your help in advance. Regards, Sam