Is it possible in C++ to create a new object at a specific memory location? I have a block of shared memory in which I would like to create an object. Is this possible?
Yes. You need to use placement variant of operator new(). For example:
void *pData = ....; // memory segment having enough space to store A object A *pA = new (pData) A;
Please note that placement new does not throw exception.