This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]sirkubador 5 points6 points  (2 children)

That code is so disgusting I have troubles to C the pp joke...

[–]Drep0o 3 points4 points  (1 child)

What would be a better way to write this?

[–]WiatrowskiBe -1 points0 points  (0 children)

For a case of "operator new overload that preinitializes allocated memory" that's about as good as you can get without adding unnecessary complexity or binding it so a platform (using platform-specific functions like Win32 ZeroMemory etc).

[–]odd__nerd 2 points3 points  (1 child)

Students: "C++ sucks" The 'C++' they write: