So I'm doing an exercise for passing pointers. There is a bit of the example code that doesn't make sense to me.
On line 27 SimpleCat* FunctionTwo(SimpleCat*TheCat) is giving me a bit of confusion. What is this? The syntax tells me its a function, but it is notated like a pointer to an object within the SimpleCat class.
Also, the piece of code that's trying to show that when a function is called by value, it creates a copy.. is notated on line 16: SimpleCat::SimpleCat(SimpleCat&), is this not using a reference? Why is that associated with the copy?
I know this is a bit all over the place, but its causing quite a bit of confusion. Thanks so much for your help!
I dont understand whts problem in this.
This is prototype of simple function having one parameter and return value.
one parameter: SimpleCat *theCat - this the ponter of class SimpleCat.
return value: And it return pointer of same class type, i.e. "SimpleCat".