title: Failing to change members of structs stored in two-dimensional array
body: <p>I have a global two dimensional array holding a number of structs. From inside a function I try to change it's members like this:</p>
  
  <pre><code>struct ControlPin {
      int pin;
      int previousValue;
  };
  
  ControlPin controls[CHANNELS][MULTIPLEXERS];
  
  void readControlInput(int channel, int multiplexer) {
      ControlPin control = controls[channel][multiplexer];
      control.previousValue = analogRead(control.pin);
  }
  </code></pre>
  
  <p>If i print out control.previousValue inside readControlInput() I can verify that it has changed, but after getting out of the function scope, the change is gone. How can I get a reference to the struct instead of copying it? I assume that's what happening, but I cant see why. I know that when you pass a value as a parameter to a function it is actually a copy, but here I'm accessing the global array directly?</p>
  
  <p>I'm used to Java so this is a bit confusing to me.</p>