Skip to main content
1 of 4
ZMitton
  • 2.8k
  • 4
  • 19
  • 34

How can I instantiate an array of push values to it?

I simply want to create an array with stuff in it. Everything I try is an error message in mist. Even this code snippet I got straight from the docs wont compile:

    uint someVariable;
    uint[] data;
    function f() {
        uint[] x = data;
        x.push(2);
    }
}```
 
ZMitton
  • 2.8k
  • 4
  • 19
  • 34