0

How pointers can make task easy?please explain

31st Mar 2017, 5:33 AM
Yash Singhal
Yash Singhal - avatar
2 Antworten
+ 3
c++ is a great language because you can control the memory. Pointers can get the data of a specific peice of memory. Pointers are a more complex version of reference variables.
31st Mar 2017, 5:38 AM
David Najafi
David Najafi - avatar
+ 3
improve performances: say you have a list objects in your program that use a lot of memory. Passing your objects to a function would duplicate the amount of memory used as it would need to make a copy of that object every time. referencing with pointers, the memory address of the objects, and passing it to a function, the pointer will be duplicate instead of the entire object.
31st Mar 2017, 5:41 AM
seamiki
seamiki - avatar