0

What is pointers? Please help me understand it and how to use it.

14th Sep 2016, 4:28 PM
Ojas Sinha
Ojas Sinha - avatar
2 Answers
+ 2
Pointers contain a memory address. You can use * to dereference the pointer and access the value pointed. int a = 42; int *p = &a; cout << p; //prints the address of a cout << *p; //prints the value of a
14th Sep 2016, 4:32 PM
Zen
Zen - avatar
0
A pointer is a variable pertaining to a memory address (&) usually a hexadecimal, or it can be used to call what's stored in a variable (*p = &variable). Pointers are often used to create editors for programs but can serve many other purposes.
14th Sep 2016, 6:34 PM
Name Less
Name Less - avatar