I'm not quite sure what you mean, but i'll take a guess and say that you're looking to read/write to/from an exe file.

Rather than go through the steps involved in doing this using C++ code, I'd first like to clarify your reasons for doing it. Are you looking to write a patcher? Or do you think that "opening the file" is going to give you some form of human readable information that you can then "adjust" to make changes to that exe?

If you mean the former, then you need to do some reading on file I/O (of which there are numerous tutorials on the internet, and probably on this site too!), using binary mode instead of text mode.

If you mean the latter, then you're going to be disappointed, because EXE files aren't really human readable (unless of course you're an ASM coder ).

Hope that helps.