0
How pointers can make task easy?please explain
2 odpowiedzi
+ 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.
+ 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.