In C++ video 48, there is an & before the object variable name.
void stinkysFriend(StankFist &sfo)
I do not understand why & is needed before the object name. Should not it be simply without an & as:
void stinkysFriend(StankFist sfo)
or more preferably with an asterisks before the object name as if we are passing a pointer:
void stinkysFriend(StankFist *sfo)
Could you clear it for me please?
Why & is used before parameter?
Post a Reply
|Oldest Newest Rating|
Used in many types of software including music players, video games, and many large scale applications.
|Bucky Roberts Administrator|