My current task right now is to write one program that as input introduces some textual specification for compressing 64-bit instructions into 32-bit instructions. From this specification I have to build two executable programs: encoder and decoder.
Currently, I am just writing a parser class to indicate the text specification that I have developed, but in the end I will have to turn the information that I receive into two new programs. The only way I know I can do this is to print in a new .cpp file using thenstream, then using system('g++ new_file.cpp -o new.x') to create the executable. Then perhaps system('rm new_file.cpp') for cleaning.
I went around all the other ways to do this, but found nothing. If you have any advice, I will be very grateful.
thanks
ps I have not included any of my codes because the code does not matter. For simplicity, my goal could be to write a program whose output is "Hello, World!" -esque executable file.
source share