1) Overloaded constructors are used to have another way of calling the object's constructor, they are not really compulsory.
2) I'm sorry, I didn't know about that instruction. :) From what the instruction said,
is an instance of Location." |
, so that means it is an object with a Location class you can change it back to what you just previously did(I changed a few things here btw):
Location locateLargest(const double a[][COLUMN_SIZE]); ///location.h
Location Location::locateLargest(const double a[][COLUMN_SIZE]) ///location.cpp
myLocation.locateLargest(a); ///main
I really think that void would be more appropriate here though , since you never use its return type anyway..:)
As for the other 3, You've already made them. But if you WANT to return them, as a value, make a function that returns them in the public scope. Say for example:
int myrow()
{return row;)
Note that it(row) is private.