Calling a function from a pointer? C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Calling a function from a pointer? C++

I am completely stumped on this one... can anyone help and explain? Student st; Student *stPtr = st; stPtr (what goes here?) printAge();

9th Dec 2020, 9:16 AM
Christian Baldonado
Christian Baldonado - avatar
3 Answers
+ 4
https://code.sololearn.com/cLheKuoZD23h/?ref=app This is simple program used to swap two numbers using pointers. Hope this helps you
9th Dec 2020, 6:19 PM
Aysha
Aysha - avatar
+ 2
->
9th Dec 2020, 9:19 AM
durian
durian - avatar
+ 2
use arrow to access pointer props/methods
9th Dec 2020, 9:20 AM
durian
durian - avatar