title: Changing the value of a member vector variable in a member function
body: <p>A have a function in my class that looks something like this:</p>
  
  <pre><code>void SomeClass::SomeFunction(int i, int j){
  
      float var = MemberVector[i][j];
      float temp;
      temp = var * -1;
   ~~~Some Condition~~~{
          MemberVector[i][j] = temp;
      }
  }
  </code></pre>
  
  <p>I want to get the value at [i][j] in the vector member variable, and multiply it by -1, i.e. make it positive if it is negative and vice verse. </p>
  
  <p>I thought that the vector operator[] returns a reference to the value a the position specified inside the square brackets, but when I run my code it isn't change the values in the member vector variable.</p>
  
  <p>Is there a way to refer to get value at [i][j] in the member variable by reference inside a member function and change it as I describe?</p>