C++ & and * | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

C++ & and *

what is different between those two? i know that they r all pointers though..

29th Jul 2016, 10:05 PM
Mark Lee
Mark Lee - avatar
3 Answers
+ 2
& is used to return the memory address of an object or variable. * is used to declare a pointer.
29th Jul 2016, 11:41 PM
Cohen Creber
Cohen Creber - avatar
0
thanks!
30th Jul 2016, 12:00 AM
Mark Lee
Mark Lee - avatar
- 1
& is means address of variable.. or & is means AND gate for example, a=5, b=7 so, a&b; and * is used in pointer...
30th Jul 2016, 5:56 AM
meherDev
meherDev - avatar