Customer new should put on .cpp file

One time I create a Vector3 class and put the custom new() method in the header file. However the compiler still think that there is a default new() method in the .cpp file, so that it complaint there is a second definition of the new() method. But if I put new() method in the .cpp file, no more complaint.

Thus: Put custom new() and delete() in the .cpp file.

Leave a Reply

Your email address will not be published. Required fields are marked *