K
Karthik
In a recent techincal interview on C++, I came across this strange
question....
How to ensure that your class object is always created in heap (by a
new operator)? The compiler should throw error, if the object is
created in stack.
Note:- Dont hide the construtor.
Is it possible?
question....
How to ensure that your class object is always created in heap (by a
new operator)? The compiler should throw error, if the object is
created in stack.
Note:- Dont hide the construtor.
Is it possible?