title: mkdir variable type C++
body: <p>This is a part of the program I'm trying to create in C++.<br>
  Ever since starting with C++ I've had a problem with different variable types.
  The function mkdir requires <code>const char</code> I believe and I'm not sure how to convert the right variable from input to what I need.</p>
  
  <p>All the variables and includes required are in the program. This is my only problem.</p>
  
  <p>I might not be the most specific on my problem but I'm new to C++ and any help will be appreciated, thanks!</p>
  
  <pre><code>int createaccount(const char acc_name)
  {
       int status = mkdir("/home/person/Desktop/Accounts/" + acc_name, S_IRWXU);
       return 0;
  }
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code>std::string new_acc_name;
  cin &gt;&gt; new_acc_name;
  new_acc_namechar = str.new_acc_namechar_str();
  createaccount(new_acc_namechar);`
  </code></pre>