title: C++ system mkdir with path
body: <p>Ran into a little snag here. I'm trying to make a directory inside of another directory using a variable directory name created by the function in use. Basically I want to store any created accounts in a directory named accounts that is separate from everything else. Here is what I have for my function:</p>
  
  <pre><code>system(("mkdir -p /home/user/Program/accounts"+accname).c_str());
  </code></pre>
  
  <p>The problem I am running into is that it creates the directory in Programs as accounts(accname) instead of in accounts with accname being the directory.</p>
  
  <p>Example with accname = tim would currently look like accountstim inside of Program instead of tim inside of accounts.</p>