title: C++ can you make a code that executes user input as a command?
body: <p>Hi I have been trying to make a program that will ask for the users input and whatever the user types it will execute it as a command. Sort of like CMD</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  string A;
  int main(){
      for (int i = 0; i &gt; -1; ++i){
          cout &lt;&lt; "Command: ";
          cin &gt;&gt; A;
  
          // Here Would Be The Code
  
          cout &lt;&lt; "Command Executed!";
      }
  }
  </code></pre>
  
  <p>Here is what i imagine a possible output (if it worked)</p>
  
  <pre><code>Command: cout &lt;&lt; "Test";
  Test
  Command Executed!
  </code></pre>