title: C++ conversion from char * to unsigned char?
body: <p>Hello I'm trying to create a take a program path and put in in a registry file, but I keep on having an error. Here is the code:</p>
  
  <pre><code>#include &lt;iostream&gt; 
  #include &lt;windows.h&gt; 
  #include &lt;winuser.h&gt; 
  #include &lt;tchar.h&gt;
  #include &lt;limits&gt;
  
  using namespace std;
  
  void reg() {
  char buffer[MAX_PATH];
  
  GetModuleFileName(NULL,buffer,sizeof(buffer));
  
  const unsigned char Path[ MAX_PATH ] = {buffer};
  
  ::HKEY Handle_Key = 0;
  
  ::RegSetValueEx( Handle_Key, "My Directory", 0, 1, Path, sizeof Path  );
  };
  </code></pre>
  
  <p>The error I'm getting says</p>
  
  <blockquote>
    <p>invalid conversion from 'char*' to 'unsigned char' [-fpermissive]</p>
  </blockquote>
  
  <p>I have spent hours looking for a solution, but I can't find one.</p>