answersLogoWhite

0

They exist in different contexts. Handles are like... well handles (or keys, tickets, references etc), to access objects (like files, sockets, resources) you have opened (created, allocated, etc); in the program they can be integers or pointers.

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

Difference between array and pointers in c plus plus?

A pointer is simply a variable that can store a memory address and has the same purpose in both languages. The only real difference is that C++ pointers can point at objects (instances of a class) and indirectly invoke their methods, whereas pointers in C (which is not object oriented) cannot.


What do you use to supplement your current testing methods with the ability to flag memory leaks and unassigned pointers you use?

I have no need to flag memory leaks or unassigned pointers because I eliminate all leaks at source by using resource handles, smart pointers and making proper use of RAII.


Do other programming languages implement pointers?

All programming languages implement pointers, but not all languages allow low-level access to memory through a raw pointer. Java, for instance, uses resource handles and smart pointers rather than raw pointers, however the actual allocation of memory is handled by the Java virtual machine (JVM) so there is no need for low-level raw pointers.


What is difference between stack pointer and program counter?

Both of them are pointers, but otherwise they are completely unrelated. The former points to the current position of the stack, the latter points to the current instruction of the program.


Why array is a implicit pointer?

An array of pointers is exactly what it sounds like - one or more pointers arranged in order in memory, accessible through a common base name and indexed as needed. Philosophically, there is no difference between an array of pointers and an array of objects...int a[10]; // 10 integers, named a[0], a[1], a[2], ..., a[9]int *b[10]; // 10 pointers to int, named b[0], b[1], b[2], ..., b[9]If you initialize the array of pointers...int i;for (i = 0; i < 10; i++) b[i] = &a[i];... then *b[0] would be the same as a[0], etc.

Related Questions

What is the difference between c plus plus and java programming?

Java doesn't have pointers. C++ has pointers.


What is the difference between insertion point and cursor?

What is the deference between Insertion Point and Pointers?


What is the difference between pointers in c and c plus plus?

Nothing.


What is the difference between equals 0 and equals NULL?

NULL is for pointers, 0, for numbers


What is difference between bank and post office?

A bank handles money and a post office handles letters and packages.


Difference between array and pointers in c plus plus?

A pointer is simply a variable that can store a memory address and has the same purpose in both languages. The only real difference is that C++ pointers can point at objects (instances of a class) and indirectly invoke their methods, whereas pointers in C (which is not object oriented) cannot.


What is difference between to busbar and feeder?

The busbar is used as a conductor and is used as a connection between the parallel and the feeder. The feeder is the supply, and it handles the relays.


Can you explain the difference between pointers and variables in programming languages?

In programming languages, variables are used to store data values, while pointers are variables that store memory addresses of other variables. Variables directly hold data, while pointers hold the location of where data is stored in memory.


What is the difference between the functions memmove and memcpy?

memmove handles the case where the source memory and destination memory overlap.


What do you use to supplement your current testing methods with the ability to flag memory leaks and unassigned pointers you use?

I have no need to flag memory leaks or unassigned pointers because I eliminate all leaks at source by using resource handles, smart pointers and making proper use of RAII.


What is the difference between a bucket and a pail?

The major difference between buckets and pails is their size. A bucket tends to be larger than a pail. Also, buckets come in a variety of shapes while pails are generally wider at the top than at the bottom. Pails always have handles while buckets sometimes do not have handles.


Do other programming languages implement pointers?

All programming languages implement pointers, but not all languages allow low-level access to memory through a raw pointer. Java, for instance, uses resource handles and smart pointers rather than raw pointers, however the actual allocation of memory is handled by the Java virtual machine (JVM) so there is no need for low-level raw pointers.