hello everyone,

i am a rookie in C++ programming, can someone please clarify my one doubt regarding difference between handles and pointers ?? actually i am little confused about handles, can any one please clarify what exactly is a Handle and why is it used??

AFAIK the C and C++ languages don't define the term 'handle', so its use can vary according to context.

In addition to the usage as described in Hamrick's link, some texts use 'handle' to describe C++ References .. in this context, 'handle' is a synonym for 'alias' or 'nickname'.

Hamrick's link is about as succenct as you can get. The why on the other hand probably will never be know. It could be deliberate, accidental or just a matter of convienence as code is being developed, modfied or upgraded. Concentrate more on the API's that provide you handles to files, memory, windows etc, and how they are used in other API's.

hello everyone,

i am a rookie in C++ programming, can someone please clarify my one doubt regarding difference between handles and pointers ?? actually i am little confused about handles, can any one please clarify what exactly is a Handle and why is it used??

The term handle is used to mean any technique that lets you get to another object — a generalized pseudo-pointer. The term is (intentionally) ambiguous and vague.

Read more

This article has been dead for over six months. Start a new discussion instead.