title: How can you compile all cpp files in a directory?
body: <p>I have a number of source files in a number of folders.. Is there a way to just compile all of them in one go without having to name them?</p>
  
  <p>I know that I can say </p>
  
  <pre><code>g++ -o out *.cpp 
  </code></pre>
  
  <p>But when I try</p>
  
  <pre><code>g++ -o out *.cpp folder/*.cpp
  </code></pre>
  
  <p>I get an error.</p>
  
  <p>What's the correct way to do this?  I know it's possible with makefiles, but can it be done with just straight g++?</p>