title: _mkdir strange behaviour c++
body: <p>I'm struggling with a strange issue.
  I want to create a folder for the solution of my program and I've written the following code:</p>
  
  <pre><code>timer = time(NULL);
  path.assign(".\\Solution_");
  path.append(ctime(&amp;timer));
  ch1 = ':';
  ch2 = '_';
  for (i = 0; i &lt; path.length(); ++i) {
      if (path[i] == ch1 || path[i] == ' ')
      path[i] = ch2;
      }
  
  mkdir(path.c_str());
  </code></pre>
  
  <p>it doesn't create anything even if <strong>path</strong> is equal to "<em>.\Solution_Thu_Jun_12_10_10_31_2014</em>" and if I type </p>
  
  <pre><code>mkdir(".\\test");
  </code></pre>
  
  <p>It works correctly.
  I did many test and I ckeck all I could but I cannot figure out what's wrong.
  Can anyone help me please?
  Best,
  Roberto</p>
  
  <p>Detail:
  Even if I use <code>mkdir(path.c_str());</code> with path equal to "Solution_Thu_Jun_12_11_52_04_2014" (without any \) it doesn't work anyway and on the other side 'mkdir("test");' works.</p>
  
  <p><strong>Solution</strong>: 
  Ok there was a hidden newline.
  Thanks everyone for the help :-)!!!</p>