Recently, I’ve been dabbling with Pointers in C++. According to what I’ve read, pointers variables are used to pass variables by reference (similar to ByRef in VB) or function pointers (delegates in C#). I’m pretty sure pointer usage is not confined to these examples. I was hoping to know some applications where pointers are necessary. Most tutorials on the net try to explain the pass by reference usage.
Thanks in advance and sorry for the noobish question 🙂
Recently, I’ve been dabbling with Pointers in C++. According to what I’ve read, pointers
Share
Generally you can use pointers only when you don’t have any other option. For eg In C there is no way of passing a variable “by reference” to a function.
Also in C++ without pointers you can’t really achieve run time polymorphism.