codeWord - Thoughts on Software
Wednesday, March 17, 2004
Re: ansi c++ revisited(by me)
MyClass x2 = new MyClass; // object created on heap
that won't work in C++, new returns the address of the object it created on the heap, so it will have to be
MyClass * x2 = new MyClass;
or
MyClass x2 = *(new Myclass);
dinesh.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment