Well if i have understood your problem then this may be the solution.
#include <iostream>
using namespace std;
int (*ptr) (const char[]);
int main()
{
ptr = system;
....... procedure ......
....... work .......
ptr("clear");
return 0;
}
system is a function to pass commands to the shell. You can make a pointer to the function and call it just as a function with the command as the argument. So you have captured the command using an identifier.