SyntaxFix
Write A Post
Hire A Developer
Questions
You can just concatenate the strings and build a command line.
std::string command = a + ' ' + b + " > " + c; system(command.c_str());
You don't need any extra libraries for this.