+ 1

Can someone explain me what are pointers in c++ and how to use them

7th Apr 2018, 8:46 PM
Rui Pedro Leocádio Borges
Rui Pedro Leocádio Borges - avatar
3 Respostas
+ 7
C++ allows you to have pointer on a pointer and so on. Passing an argument by reference or by address both enable the passed argument to be changed in the calling function by the called function. C++ allows a function to return a pointer to local variable, static variable and dynamically allocated memory as well. https://www.tutorialspoint.com/cplusplus/cpp_pointers.htm you must check reference too. https://www.geeksforgeeks.org/pointers-vs-references-cpp/
7th Apr 2018, 8:53 PM
Scooby
Scooby - avatar
+ 3
Pointers are memory addresses. You can have memory addresses (pointers) to functions and data (variable etc). S.D's answer offers a more detailed look at what they can do.
7th Apr 2018, 8:57 PM
Emma