I'm trying to write a C++ program in Linux that communicates with a chess engine via its command line interface. Chess engines have standard protocols like UCI so, if I could write this, I could use different chess engines interchangeably.
My C++ program should start the chess engine, send it a command, get the output, send it a command, get the output, etc... How is this done?