@MiiNiPaa:
Thanks a lot, but still have got two questions regarding that:
1) Won't that be a bit hard if Generated.cpp has a very big source?
2) You generate a 'Generated.cpp' wouldn't that just be a source, and not an executable?
1) How do I do that without using the system-function?
I once had an application doing that on my Windows, when I even didn't had a compiler installed.
Embed it in program, write in the instruction: do not remove file, create an executable with big gap in data segment, so you can write your own data by known adress.
There are dozens way to do this. Each has own benefits. Best way is to not do that. Why do you need it anyway?
I need an application (A - main), which configures an application (B - generated).
B works with sockets and should be able to interact with servers.
Which servers (IP address) should be configured using A.
So that the user shouldn't be configuring B the whole time it starts-up, besides that the user should be able to create multiple Bs (which isn't possible if I pre-make B; so it must be generated).
And it shouldn't be user-dependent, in the context that B shouldn't depend on text-files, compiler installed or not,...
Create program B as usual with single predefined IP address. Open executable and find where that IP is stored.
Create another program which will copy that executable and change bytes of that IP address.
Enjoy most AV programs blocking your program.