I am reading the solidity docs but there is a part I don't really understand.
In this example:
pragma solidity ^0.4.0;
contract C {
uint someVariable;
uint[] data;
function f() public {
uint[] x;
x.push(2);
data = x;
}
}
the doc says that "The type of the local variable x is uint[] storage, but since storage is not dynamically allocated, it has to be assigned from a state variable before it can be used."
I don't really understand what does it mean by "storage is not dynamically allocated" and why the method "x.push(2)" does change the "somevariable"
Any help is appreciated.