Possible Duplicate:
Create new C++ object at specific memory address?
I am writing what is essentially an object pool allocator, which will allocate a single class. I am allocating just enough memory to fit the objects that I need, and I am passing out pointers to spaces inside.
Now my question is this: Once I have gotten a pointer within my pool, how do I construct an object there?
You use placement new. Like so: