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