While trying to solve one of the seemingly simple codes which my friend asked me to write, I ran into a totally unseen and different programming methodology.I am not sure whether this style is new or even patented by someone else...Any way I found it myself :-)


Well.....now about the code....
The question asked by my friend was to read a mathematical function in x and then assign value to the variable x.
The question looks seemingly simple,but I was fed up with the increasingly growing code...So i found a new way to solve it...I wrote statements in the code which will create another file with a perfectly executable C++ script ( iff  the expression is in correct syntax ).Then the first code is compiled and run,resulting in creation of the new script,which is again compiled and run.This can be easily accomplished by using a simple shell script given below.....
Here comes the code.....

1.The C++ program
2.The Shell Script to run the code
3.The temporary C++ file created by the first code

Warning:The above codes are meant for linux compiler....
Just copy the first two files into a single directory,change permissions of 2nd file using
chmod 777 <filename>
Then execute it by using
./<filename>