Wrapping executable's input and output in c++
<p>There is a program in java (Minecraft) and for the server part of it, it opens up in a terminal and prompts the user for commands, as well as give feedback for loading progress and other stuff.  How can I make a c++ "wrapper" to automatically send commands to the terminal, and receive the response?</p>

<p>I could automate commands such as say and kick with GUI elements.  I am running a mac with OSX Lion.</p>
