overloading new/delete
Maybe you can do what you want with a little bit of preprocessor magic: #include <iostream> using namespace std; void* operator new (size_t size, const char* filename, int line) { void* ptr = new char[size]; cout << “size = ” << size << ” filename = ” << filename << ” line = ” << … Read more