title: Needing to use char** in C++ instead of std::string*
body: <p>I am working on an assignment for my operating systems class. We have the option of using C or C++, so I decided to use C++ since I practised it on the job a bit more recently than C. </p>
  
  <p>I will need to call (from " 
  <em>$ man execvp</em> " on Linux)    </p>
  
  <pre><code>int execvp(const char *file, char *const argv[]);
  </code></pre>
  
  <p>which (unless I am mistaken) means I need a C-style char* array (a string array in C), and will not be able to use std::string from C++. </p>
  
  <p><strong>My question is:</strong> what is the proper way to make/use char* arrays instead of string arrays in C++? Most people tend to say malloc is not used any more in C++  (which I tried now with some complications)</p>
  
  <pre><code>char** cmdList = (char**)malloc(128 * sizeof(char*));
  </code></pre>
  
  <p>but I don't know how to make a char* array without. <strong>Is it still appropriate to solve this how I would in C even though I'm using C++?</strong> I haven't ever run into a circumstance where I couldn't use string in C++.</p>
  
  <p>Thanks for everyone's time.</p>