Why a program made in C++ can not be again converted to it's source code??? |
After compiling the program you will have binary code. These are instructions for processor. And CPU does not have things as variables, loops, objects and many other things, so they got dropped (for things which are only needed in compile time) or converted into other things.
For example it is impossible to tell int from bool in resulting executable because there is no bools in CPU. Or guess which kind of loop was here: while/do-while/for; unless you know specific compiler quirks. There is rarely traces of std::unique_pointer either (it looks and behaves like raw pointer). References are undistinguishable from pointers (they are commongly pointers internally).
Inlines, macro and also templates cannot be reconstructed because of they nature. Code which does not compiled due to peprocessor condition does not appear in executable for obvious reason.
Also there are optimisations. They can completely change sources. For example some function can completely dissapear because it got inlined. Operation reordering, dead code elimination, compile-time calculations...
Therefore it is impossible to reconstruct source. At max you can get source code which works
like original, but usually lack all high-level abstractions.