title: Cant assign values to an unsigned char*
body: <p>kind of new to c++ but im having issues running this code. It crashes after I tried to assign the first element to a char.</p>
  <pre><code>int main() {
      unsigned char *data;
      int dataLength = 4;
      data[0] = 't'; // crashes
      data[1] = 'e';
      data[2] = 's';
      data[3] = 't';
      
      cout &lt;&lt; myFunction(data, dataLength);
      cin.get(); 
  }
  </code></pre>
  <p>Might anyone know what is causing this?</p>