I am new to Solidity, and I have a small problem. For exemple I have these 2 contracts contract Dog { string name; constructor(string _name){ name = _name; } } contract Human { Dog[] dogs; uint currDogs = 0; function addDog() public { dogs[currDogs] = new Dog("test"); //I also tried dogs.push(new Dog("test")); currDogs++; } } everytime I try adding a dog to the array it is not working and I can't find a solution