title: How to set path inside of c++ program using system() function
body: <p>I need to write c++ program which sets path using system() function:</p>
  
  <pre><code>system("set PATH=%PATH%;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64");
  system("nvcc -x cu -o cudapair cudapair.c");
  </code></pre>
  
  <p>But it doesnt work. It throws error, because path wasn't set. What's the problem?</p>