I didn't even see your question, but as soon as I saw your definition for the new operator, the first thought that came to mind is "recursive!". To answer your question, change the return type of that function to void *
void * Person::operatornew(size_t obj)
As for my observation, you are defining the behavior of the new operator but in the function you are using new to create memory for a Person object. I might be wrong but this could result in an infinite loop when using the operator. You should result to C-level memory allocation if you are going to redefine the behavior of new for your object
Another observation (the same function), your parameter has a value called obj and in the function you have defined a variable of type void *, also called obj. How are you sure which one is being used when you do obj = new Person [ 5];? Because either could be used in that statement
wow thanx allot........although i wrote * after the void multiple times but it simply gave me more errors :S
and no it didnt give me an infinite loop but it made the program crash........which is ok at the moment i expected that, i always try to write the whole code and after it gives me any output i start modifying my code so i can get my desired out put ^^
Thanx allot and sorry for this silly question i disturbed you guys with.......much love <3