title: C++ - Error: Expression must be a modifiable lvalue
body: <p>I'm creating a C++ application and I have a class which contains a <code>char</code> array variable, like this:</p>
  
  <pre><code>class MyClass
  {
  public:
      // The constructor
      MyClass(char[]);
  private:
      // The variable
      char myVariable[];
  }
  </code></pre>
  
  <p>And I try to set this variable in a constructor like this:</p>
  
  <pre><code>// The constructor
  MyClass::MyClass(char myVariable[])
  {
      // Set the variable
      MyClass::myVariable = myVariable;  //&lt;----- Error
  }
  </code></pre>
  
  <p>but then I get an error (<code>Error: expression must be a modifiable lvalue</code>) on the line where I set the <code>MyClass::myVariable</code> variable on. I'm new to C++, so I have no idea about what this means. Any help would be appreciated!</p>