8

Here is the function of my code where error comes

```

function getPeople() constant returns(bytes32[], bytes32[], uint[] ) {

uint length = people.length;

bytes32[] memory firstNames = new bytes32[](length);
bytes32[] memory lastNames = new bytes32[](length);
uint[] memory ages = new uint[](length);

for(uint i=0; i<people.length; i++) {
  Person memory currentPerson;
  currentPerson = people[i];

  firstNames.push(currentPerson.firstName);
  lastNames.push(currentPerson.lastName);
  ages.push(currentPerson.age);

}

```

Error is Member "push" is not available in bytes32[] memory outside of storage. firstNames.push(currentPerson.firstName);

gkrishna
  • 81
  • 1
  • 2

0 Answers0