What will be the C++ equivalemt command for below mentioned php command:

```
$command = shell_exec("sqlldr {$connect_string} control={$ctl_file_name} log={$log_file_name}");

```
['https://Stackoverflow.com/questions/15136935', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2107491/']
So based on your comments a solution that would work would be to use popen(3):

```
#include <cstdio>
#include <iostream>
#include <string>

int main()
{
   // Set file names based on your input etc... just using dummies below
   std::string
     ctrlFileName = "file1",
     logFileName  = "file2",
     cmd = "sqlldr usr/pwd@LT45 control=" + ctrlFileName + " log=" + logFileName ;

   std::cout << "Executing Command: " << cmd << std::endl ;

   FILE* pipe = popen(cmd.c_str(), "r");

   if (pipe == NULL)
   {
     return -1;
   }

   char buffer[128];
   std::string result = "";

   while(!feof(pipe))
   {
     if(fgets(buffer, 128, pipe) != NULL)
     {
         result += buffer;
     }
  }

   std::cout << "Results: " << std::endl << result << std::endl ;

   pclose(pipe);
}

```
Try `forkpty`, you get a file descriptor which you can use to read from the other pseudoterminal.