I stumbled upon another what I think is initializer, like int and char, named HANDLE.
It's also used when creating an application, I've browsed the net and found that it is a sort of pointer to an object that can change without me knowing it... eh... It wasn't really that good of an explanation. Can anyone explain it a bit more... dumbed down for me? Giving examples usually helps.
int integer; char character; HANDLE handle;
- What does it do?
- How can I use this effectively in a code that doesn't have to do with windows itself? and by that I mean, can I use a handle on one of my own objects or variables or whatever it does?
- Can it be used to "point" to a class or a class member? If yes, please give an example
Answer should (doesn't have to) include/have/be:
- an example
- explained, if possible, line by line
Sidenote: I've seen this HANDLE used in another code called JASS (Blizz code), where the handle could be a timer, unit, trigger, effect, anything that is an object. If you'd rather explain it through JASS, I won't mind (It's easier to understand Blizz's dumbed down language).
Sidenote: Hope I was clear enough for people to understand. :)