Hi everybody.
I have a question, how could i create an exe from my project ?
I'm opening the file like newarchive.open("archive.exe", ios::binary);
But now, how could i put commands inside?
Thanks
Binary modification is a tricky task. I disrecommend doing it unless you know exactly what you're doing. What exactly are you trying to do? It might be a better idea to store the source code somewhere so that your program can access it, modify it, and then call the compiler from the shell.
Well, what i want to do is similar to a winrar, to save 2 archives and then make ONE exe with the 2 exes inside. When we open the exe created before it should make again the two exes.
So, i could copy the different twos exes to the variables, but know i must make the new exe wich will contain the code of the, make and execution.
Edit: I have a new idea, but i think i would need to give the new .cpp a variable, from the first exe. Is this possible ?
Example
int number = 2;
fstream archive;
archive.open("new.cpp", ios::binary);
archive << "here i need to put NUMBER, but not the contain.";