title: Running C++ program from ruby
body: <p>How can you run a C++ program from a Ruby script?</p>
  
  <p>Suppose that the Ruby script generates a file, called "hello.txt" and I want to run a C++ program to take the hello.txt file, work with it and write another file, called "result.txt" and the Ruby script continues to read the result.txt file.</p>
  
  <p>For example, in the Linux shell I wrote <code>g++ hello.c -c hello -o hello</code> to receive the "result.txt" file.</p>
  
  <p>Is there is a way that I can run the shell code from a Ruby program? </p>