I'm confused too.

If you just need to run a program from your code form a command and pass it to system():
Code:
int main()
{
  system( "./runApp > abc.log" );
}
Describe what are you going to do otherwise!