- #1
ChrisVer
Gold Member
- 3,378
- 464
I have a simple question I guess, basically by how classes etc are formed. In general a class in C++ has some categories such as private, public and protected, which okay everyone knows/can find what they are meant for. E.g. a private member will not be accessible outside the class member functions. My question is then, is it possible to completely hide it from the user then? Or even hide the whole class if you don't want them to "play around" with it?
As an example, my question is related to the intermediate step between having a source code which runs and produces executables from the programmer, and the application which is publicly distributed. When I install a game X, I am unable to see the code which actually built it and runs behind the scene [except maybe for if I am a cheater or something]. what happened to it? In the past I had tried sending to a friend just the executable of a fun project I made [with python in that case], but she was unable to run it without the code- however I didn't want to send the code which would need more stuff from her side to run [e.g. download the necessary interpreter, modules etc] but also because it would make the project easy to change by the user.
As an example, my question is related to the intermediate step between having a source code which runs and produces executables from the programmer, and the application which is publicly distributed. When I install a game X, I am unable to see the code which actually built it and runs behind the scene [except maybe for if I am a cheater or something]. what happened to it? In the past I had tried sending to a friend just the executable of a fun project I made [with python in that case], but she was unable to run it without the code- however I didn't want to send the code which would need more stuff from her side to run [e.g. download the necessary interpreter, modules etc] but also because it would make the project easy to change by the user.