What is the difference in passing an arguement with a paramter like void heapify(vector &heap) and void heapify(vector *heap) since the latter is a pointer variable and the former is a reference varibale?
Difference in parameters of function
@Ayush-Kokande-2816457821730452 hey when you pass an argument as referencemthen while calling function you have to simply pass value of vector ,not adress.But while using pointer you have to pass the address of vector while calling ,see this for more information:
https://www.tutorialspoint.com/what-is-difference-between-a-pointer-and-reference-parameter-in-cplusplus
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.