title: Convert command line argument to string
body: <p>I have a program that reads hard-coded file-path and I want to make it read file-path from command line instead. For that purpose I changed the code like this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main(char *argv[])
  {
  ...
  }
  </code></pre>
  
  <p>but, <code>argv[1]</code> variable exposed this way seems to be of type pointer, and I need it as a string. What should I do to convert this command line argument to string?</p>