Given these pseudo C++ class definitions:
Code:
class Request
public:
    char* name;
    ArrayOf_Property* properties;
   
class ArrayOf_Property
public:
    Property** ptr;
    int size;
   
Property
public:
    char *key;
    char *value;
is the following correct initialization? (do not worry delete, i will do that later):
Code:
Request* req = new Request;
req->properties = new ArrayOf_Property;
req->name = new char[128]
int size = 2;
Property** items = new Property*[size];
for (int i=0; i<size; i++) {
    items[i] = new Porperty;
}

items[0]->key = new char[128];
items[0]->value = new char[128];

items[1]->key = new char[128];
items[1]->value = new char[128];

req->properties->ptr = items;
req->properties->size = size;