Posts by Fernando Ferreira • 33 points
1 post
-
3
votes1
answer73
viewsQ: Allocate memory with pointer or reference?
Is there any significant difference between these two methods? MyClass &ref = (*(new MyClass)); MyClass *ptr = (new MyClass);