title: c++ expand macros and re-create output file
body: <p>Is there a way to expand a macro in C++ and re-create output file.
  For example:-</p>
  
  <pre><code>cat tmp.cpp 
  #include&lt;iostream&gt;
  using namespace std;
  
  int main() {
      cout&lt;&lt;"Macro = "&lt;&lt;VALUE&lt;&lt;endl;
  }
  </code></pre>
  
  <p>with -DVALUE=10</p>
  
  <p>I want a file to show (notice VALUE replaced by 10)</p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  int main() {
      cout&lt;&lt;"Macro = "&lt;&lt;10&lt;&lt;endl;
  }
  </code></pre>