title: Compile C++ file Using PHP
body: <p>I am using PHP on Windows machin. I also use Dev C++. I can perfectly compile .cpp file on CMD using this command:</p>
  
  <pre><code>g++ hello.cpp -O3 -o hello.exe
  </code></pre>
  
  <p>Now what I am trying to do is running the same command using php system() function, so it looks like this:</p>
  
  <p>system("g++ c:\wamp\www\grader\hello.cpp -O3 -o C:\wamp\www\grader\hello.exe");</p>
  
  <p>but it doesn't compile. I am lost, please tell me what am I missing? </p>
  
  <p>I also looked up at this question and thats exactly what I need, but I couldnt find a usefull solution for my case there:</p>
  
  <p><a href="https://stackoverflow.com/questions/7157696/php-script-to-compile-c-file-and-run-the-executable-file-with-input-file">Php script to compile c++ file and run the executable file with input file</a></p>