+ 1
Can someone explain me what are pointers in c++ and how to use them
3 Réponses
+ 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/
+ 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.