title: How to send std::string array between processes C++
body: <p>In C++, I need to start a secondary program from a primary program, sending the second some arguments. I need to return the data produced by the secondary program to the primary program. In this case, the data happens to be a two-dimensional std::string array; we'll call it <code>stringArray</code>. This is easy enough to do:    </p>
  
  <pre><code>// snippet from Primary
  std::string executionString ("./secondaryProgram arg1 arg2 arg3");
  system(executionString);
  </code></pre>
  
  <p>What I don't know how to do is get the data that Secondary Program produces back to the Primary program (short of writing to a temporary file from Secondary and then reading the file from Primary).</p>
  
  <p>In other words, it would be great if I could do something like:</p>
  
  <pre><code>// snippet from Primary
  std::string stringArray[2][3];  
  stringArray = system(executionString);
  </code></pre>
  
  <p>I'm not hoping for a solution as simple as this or working code from anyone, any nudge in the right direction is appreciated. </p>
  
  <p>I cannot use sockets for this purpose. I have not been able to figure out how to build a pipe between std::cout and std::cin that works for this case. My only real constraint is that my solution involve <code>system()</code> somehow.</p>