Solidity Structure Array Initialization

Hi All,

apologies for accidentally posting this as a new discussion.

Can someone please let me know how to handle initialization in the following case:

pragma solidity ^0.4.11;
contract Test {

struct Child {
string name;
uint age;

struct Parent {
string name;
Child [] myChildren;

Parent[] allParents;

function AddParent( string name ) returns (uint) {
Parent memory parent = Parent( { name: name, myChildren: new Child[](0) } );
allParents.push( parent );
return allParents.length-1;

This results in UnimplementedFeatureError: Copying of type struct Test.Child memory[] memory to storage not yet supported.

Thank You,

Sign In or Register to comment.