Sorry if "new call" isn't a C++-term. If it is not, tell me what's the right term. I'm a C programmer starting with C++. I have struct A
that I want to initialize it using paramereters in new
operator. Like this:
A* a = new A(foo, baa);
So, I tried to use it defining function: void* A::operator new(T a, T B) { ... }
But I get an compiler-error:
error: 'operator new' takes type size_t ('unsigned int') as first parameter
Also, not sure if it's relevant but the function that overload parameter of size_t
type is already defined, like this:
void* A::operator new(size_t size) { ... }