Skip to main content
1 of 4
Loki Astari
  • 97.7k
  • 5
  • 126
  • 341

You are not overloading the new operator correctly.

See: How should I write ISO C++ Standard conformant custom new and delete operators?

But you should not be overloading new at all. All the work you are doing here is stuff that goes in the constructor.

The sole job of the new operator is to allocate memory (not initialize it).

Loki Astari
  • 97.7k
  • 5
  • 126
  • 341