You could create a shortcut (.lnk) that would pass the name as an argument to the EXE. For the user, it probably does not matter much if he click on a LNK instead of an EXE.
An alternative would be to create a file with a .displayName
extension and then register it for double click.
I am not sure but you could probably generated a program with a section for constant data and then modify that section. Also, using a ressource section might possibly works.
Obviously writing a compiler is far from easy especially for a language like C++ that is among the harder to parse correctly.
- If you want to do that for learning purpose then read books on that subject.
- If you really want a program that double click on it display your name, then reconsider the way to do it.
And not really explaining the purpose do make your question a bad question as one could easily create malicious software!
Finally such a quesion is beyond the scope of a forum like this. Creating a compiler is a subject for a 1000+ pages book. Nothing less.