title: command prompt in c++
body: <p>Guys what am I doing wrong here?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main()
  {
      while (true){
          std::string cmd;
          cin &gt;&gt; cmd;
  
          const char* com = cmd.c_str();
  
          cout &lt;&lt; com &lt;&lt; endl;
         // cout &lt;&lt; sizeof(com) &lt;&lt; endl;
  
          system(com);
      }
      return 0;
  }
  </code></pre>
  
  <p>Everytime I run this it works fine but when you type something like cd ../ it separates the words and runs them as two different commands so first cd, then ../ and it gives me a error. Any idea on what I'm doing wrong?
  I'm new to C++ anyway also this is supposed to bypass "command prompt has been disabled by your admin on windows"</p>