-
exe file
i have a client file of a game server and when u open it (in notepad for example) u see all those weird characters, but you can also see some normal text.
why this specific text is shown proparly? and how can i do that some text of my c++ file will be displayed like that? (i want it so it can be edited easily in the .exe file)
-
> why this specific text is shown proparly?
Code:
int main ( ) {
printf( "hello world\n" );
}
Compile it and look through the executable. Sooner or later, you'll find a "hello world" string.
If you want text to be easily changed, then put it in a text file.
-
> If you want text to be easily changed, then put it in a text file.
yes, but i have my own reasons why i want to edit it in the .exe file. =P
is there another way? beause in the client file i have you can edit the ip you want it to connect when u simply open it with notepad, so it means the ip u edit isn't an output, it's a variable...
-
Well find another way then.
Because to edit an exe file, you need a hex editor, and considerably more skill than the average user.
> beause in the client file i have you can edit the ip you want it to connect when u simply open it
Any half decent program allows command line parameters, use those.
myprog.exe -s some.ip.address.here
-
sorry, didn't understand what u just said =/
what is this line? (myprog.exe -s some.ip.address.here)
i type it in the command window? and what does it?
-
That's an example of what any self-respecting program should allow you to do.
In this case, the "-s" meant "use this server".
Make various changes to the operation of the program.
Say for example
notepad.exe myfile.txt
> (i want it so it can be edited easily in the .exe file)
Whatever this program is (whether you created it or not), find out / make it accept command line parameters.
You're free to determine what "-letter" options you want.
Console commands use "/" as an option separator - just type "dir /?" at a console prompt to get the idea.
-