title: how to pass variable argument to exe?
body: <p>Okay, let's say that I have b.exe, which takes a string argument.
  I want to invoke b.exe within a.cpp, with system:</p>
  
  <pre><code>    string s1 = "hallo";
      system("b.exe s1");
      printf("s1 after invoke = %s",s1);
  </code></pre>
  
  <p>and this is the code in b.cpp:</p>
  
  <pre><code>    int main(string s)
      {
           s = "hello world";
           return 0; 
      }
  </code></pre>
  
  <p>what I want is, when I run a.exe, the output will be:</p>
  
  <pre><code>    s1 after invoke = hello world
  </code></pre>
  
  <p>is it possible to do that? basically, i just want to pass a variable to an exe, but it must be by reference, not only by value because I want that variable to be processed and modified within the exe that I invoked. I've already searched the solution on the internet, but it only provides me tha way to pass a variable by value to the exe, not by reference..</p>
  
  <p>any suggestion will be very appreciated, but if possible, I want the suggestion in the form of the above correction code and include files, if any. thanks for your help :)</p>