Dynamic Data nested C++