Say that there is a class A. And I have created an object as " A *objA = new A"
So this creates a pointer to objA of type A, right?
Okay so pointers are variables that store the address of a data type which the pointer is defined. And the address of the object could be taken as "&objA".
Now I want to pass this object to a function
so I checked and did the following two.
1) void function(A *objA); -> function call : function(*objA);
2) void function_1(A &objA); -> function call : function(objA);
I need to know what is the difference between the two?
Alright.... I am dealing with a lot of data. The object created has two maps (STL).
So passing such large objects to each and every method may result in inefficiency. That's why I asked this question. If there is any other thoughts on this please let me know.