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).
As a side note:
###As a side note:
ThoughThough you can actually add parameters to new.
Doing so is not a good idea.
As it is not normal, and thus makes it harder to maintain.
The code above will be called if you do:
// Note: The first parameter (ie size) will be auto inserted as the first parameter.
Info* data = new ("File Name", 12) Info;
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).
###As a side note:
Though you can actually add parameters to new.
Doing so is not a good idea.
As it is not normal, and thus makes it harder to maintain.
The code above will be called if you do:
// Note: The first parameter (ie size) will be auto inserted as the first parameter.
Info* data = new ("File Name", 12) Info;
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).
As a side note:
Though you can actually add parameters to new.
Doing so is not a good idea.
As it is not normal, and thus makes it harder to maintain.
The code above will be called if you do:
// Note: The first parameter (ie size) will be auto inserted as the first parameter.
Info* data = new ("File Name", 12) Info;
You are not overloading the new operator correctly.
See: How should I write ISO C++ Standard conformant custom new and delete operators? 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).
###As a side note:
Though you can actually add parameters to new.
Doing so is not a good idea.
As it is not normal, and thus makes it harder to maintain.
The code above will be called if you do:
// Note: The first parameter (ie size) will be auto inserted as the first parameter.
Info* data = new ("File Name", 12) Info;
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).
###As a side note:
Though you can actually add parameters to new.
Doing so is not a good idea.
As it is not normal, and thus makes it harder to maintain.
The code above will be called if you do:
// Note: The first parameter (ie size) will be auto inserted as the first parameter.
Info* data = new ("File Name", 12) Info;
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).
###As a side note:
Though you can actually add parameters to new.
Doing so is not a good idea.
As it is not normal, and thus makes it harder to maintain.
The code above will be called if you do:
// Note: The first parameter (ie size) will be auto inserted as the first parameter.
Info* data = new ("File Name", 12) Info;
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).
###As a side note:
Though you can actually add parameters to new.
Doing so is not a good idea.
As it is not normal, and thus makes it harder to maintain.
The code above will be called if you do:
// Note: The first parameter (ie size) will be auto inserted as the first parameter.
Info* data = new ("File Name", 12) Info;
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).
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).
###As a side note:
Though you can actually add parameters to new.
Doing so is not a good idea.
As it is not normal, and thus makes it harder to maintain.
The code above will be called if you do:
// Note: The first parameter (ie size) will be auto inserted as the first parameter.
Info* data = new ("File Name", 12) Info;