the first return exits the function, you can't return 2 values without somehow combining the values in a structure.
Of course you can use a global variable.
@SamuelAdams
I still don't know how I would use a global variable to return an (x,y)
my cout in main looks like this
|
cout<< "The center Point is: ("<<obj.getCenterPoint()<<",)"<<endl;
|
using still returns only one value.
1 2
|
Center= (Center_x, Center_y);
return Center;
|
Last edited on
Last edited on