I need to execute a program and retrieve its stdout output in c++. I\'d like my code to be cross-platform too.