Originally Posted by jacek The main difference is that new operator invokes objects' constructors, while malloc() doesn't (same for free() vs. delete). Also it can throw an exception when allocation fails and you don't need any sizeofs or casts, so the code is cleaner. I always wondered what the difference was but never had an opportunity to look it up when I was thinking about it. Thanks!
Forum Rules
Bookmarks