C++ program whose output is two C++ programs?
<p>My current task right now is to write one program which takes as input some textual specification for the compression of 64 bit instructions into 32 bit instructions. From that specification I am to build two executable programs: an encoder and a decoder.</p>

<p>Currently I'm just writing a parser class to tokenize the textual specification I've designed, but eventually I will have to turn the information I get into the two new programs. The only way I know I could do it is print out to a new .cpp file using ofstream then using <code>system('g++ new_file.cpp -o new.x')</code> to create the executable. Then perhaps <code>system('rm new_file.cpp')</code> to clean up.</p>

<p>I have looked around all over for other ways to do this, but have found nothing. If you have any advice to give, I'd be very grateful.</p>

<p>Thanks</p>

<p>p.s. I didn't include any of my code because the code is irrelevant. For simplicity's sake my goal could be to write a program whose output is a "Hello, World!" -esque executable.</p>
