+ 7

why we use pointer in c++?

3rd Feb 2017, 10:11 AM
L Boudhar
L Boudhar - avatar
3 Respuestas
+ 10
To point to an address of a variable? While we may be able to operate solely based on variables, RL implementation of variables may vary in size. When we cannot be sure of how much space/memory to allocate, we use pointers to refer to these variables.
3rd Feb 2017, 10:38 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
Pointers are the variables used to store the address of any variable we r using. They r used to access the value of any variable..... i. e one can use it to show the value contained in the variable itself
28th Dec 2017, 6:11 PM
Priya Chawla
Priya Chawla - avatar
- 3
if you have a list of values array of objects and you want to view them in a different sorted order then instead of sorting or moving the actual data just make a list of pointers and sort them. it's like an index in a database. it will take less processing and memory resources.
28th Dec 2017, 3:52 AM
Faheem Qazi