title: Is there a way to have a program open a new console window and return information with C / C++?
body: <p>I am currently trying to prevent user input to the console window. But I have yet to be able to find a way to stop or clear it so I figured maybe if I could open another console window when the user needs to type something and have that return the integers that were typed in. Either that or a way where I can prevent user input and then enable it when it is needed.</p>
  
  <pre><code>void AddMenu()
  {
      bool correctData = false;
  
      while (correctData == false)
      {
      system("cls");
      std::cout &lt;&lt; "Type the ID: ";
  
      int id = NULL;
      int data = NULL;
  
      std::cin &gt;&gt; id;
      std::cout &lt;&lt; "What would you like to add for " &lt;&lt; id &lt;&lt; ": ";
      std::cin &gt;&gt; data;
  
      if (id != NULL &amp;&amp; data != NULL)
      {
          CallAdd(id, data);
          correctData = true;
      }
  
      std::cin.clear();
      Sleep(700);
      printMainMenu(0);
  
      }
  }
  </code></pre>