title: C++ Convert wchar_t to char*
body: <p>I'm having an issue with my code.</p>
  
  <p>What I'm trying to do is get the executable path dynamically, then assign it to <code>char* n_argv</code> array. I've really been trying for some time, but decided to ask here. Sorry if this is an inapproptiate question.</p>
  
  <pre><code>int main (int argc, char** argv){
  
      char szPathToExe[MAX_PATH];
      GetModuleFileNameA(NULL, szPathToExe, MAX_PATH);
  
      std::string path(szPathToExe);
      path.append("other_argument");
      char *n_argv = path.c_str();
  
     argv = n_argv;
  
  
  }
  </code></pre>
  
  <p>Any idea on how to approach this? Thank you in advance!</p>