title: Pipe file contents in g++ to compile
body: <p>Is it possible to pipe the contents of a file into <code>g++</code> to compile a program?</p>
  
  <p>I want to do this because I want to use  a file from a database rather than a physical file on a disk. The file contents can be easily retrieved via an API I have made.</p>
  
  <p>For instance, I would like to do something like:</p>
  
  <pre><code>g++ contents_of_file -o executable
  </code></pre>
  
  <p>Thanks a lot.</p>
  
  <p>Sam.</p>