Placement new for block of pointers
<p>i am trying to allocate pointers of the first order one by one at memory.
Pointer of the second order must walk through this queue and handle to objects, created  on  that pointers.
Placement new works fine when i allocate the queue of objects(not pointers to them), but when i am trying the same with pointers the trouble happens.</p>

<pre><code>int* p;

p = new int(1);
printf("%p - %d\n", p, *p);    // address of int and its value
delete p;
</code></pre>

<p>First object is created and deleted to initialize pointer with some address, next objects will be created in cycle</p>

<pre><code>p = new(p) int(2);    // (p) - memory will be allocated at address
                      // on which p points
printf("%p - %d\n", p, *p);    // address of int and its value
delete p;

p++;

p = new(p) int(3);    // (p) - memory will be allocated at address
                      // on which p points
printf("%p - %d\n", p, *p);    // address of int and its value
delete p;
</code></pre>

<p>Output:</p>

<p>01C1FFD0 - 1</p>

<p>01C1FFD0 - 2</p>

<p>01C1FFD4 - 3;</p>

<pre><code>int** pp;

pp = new int*;
printf("%p\n", pp);    // address of int*
*pp = new int(1);
printf("%p - %d\n", *pp, **pp);    // address of int and its value
delete *pp;
delete pp;

pp = new(pp) int*;
printf("%p\n", pp);    // address of int*
*pp = new int(2);
printf("%p - %d\n", *pp, **pp);    // address of int and its value
delete *pp;
delete pp;

pp++;

pp = new(pp) int*;
printf("%p\n", pp);    // address of int*
*pp = new int(3);
printf("%p - %d\n", *pp, **pp);    // address of int and its value
delete *pp;
delete pp;
</code></pre>

<p>If int is not created by *pp then if pp is incremented it is not real to delete pp later,
if int is created by *pp then there is something strange with addresses and second value.</p>

<p>Output:</p>

<p>01C1FFD0</p>

<p>01C1FFE0 - 1</p>

<p>01C1FFD0</p>

<p>01C1FFD0 - 29491152</p>

<p>01C1FFD4</p>

<p>01C1FFD0 - 3</p>

<p>I would be very grateful for advice how to organize this queue correct.</p>
