+ 2

Pointers and pointing too.

Hey, Whats the diffrents between pointers and pointing too please? i know java dosent support pointers but i dont really know what it is as i havent done c++ i know java still points to things tho like methods so whats the diffrence please.

23rd Dec 2017, 9:54 PM
D_Stark
D_Stark - avatar
1 Respuesta
+ 4
Pointers are variables that store the memory addresses of other variables. Pointing is the act of storing (pointing to) an address within the pointer. ex: int x =0; int *p; —> pointer p p=&x; —> pointing at address of x cout << p << endl; —> prints x’s address cout << *p; —> prints x & is dereferencing operator; when used in conjunction with a pointer think ‘address of’. The example is from c++, this concept is one of the reasons that c and c++ are so powerful.
24th Dec 2017, 3:51 AM
Jared
Jared - avatar