Class function definition

I know this my sound bad but I was given a header file for a class named patient. The setter functions that I was given, I don't know how to make like the function header for it. I know it should return a void but I just don't know how to set it up. This is what I was given.

//in function header
Patient & setFirstName(const char *);

//in my cpp file
Patient & Patient::setFirstName(const char * a)

what is the correct way to define this? is this header right? do I return a patient type or do I fix it to return a void?
1
2
// set the first name 
return *this ; // return reference to the patient on which setFirstName was called 
Topic archived. No new replies allowed.