I'm trying to have my function return the current position of the person but I'm having trouble figuring out the proper way to return the value because it's a pointer value that calls a struct.
#include "position.h"
// The base class of Guards and Innocents and is abstract
class Person
{
public:
/** Person object. the base class for guards and Innocents
* @parameter pos. the initial position
* @parameter type. the type of person
*/
Person(const Position& pos, char type);
/** Gets the current position of the Person
* @return position. */
Position getPosition() const;
/** Gets the type of the person [I, R, H, Y, W]
* @return the type of the Person
*/
char getType() const;
/** Equality operator
* @parameter other the other person object
* @return true if this object has the same position as the other and false otherwise */
booloperator==(const Person& other) const;
/** Inequality operator
* @parameter other the other person object
* @return false if this object has the same position as the other and true otherwise */
booloperator!=(const Person& other) const;
/** Moves the Person from the current position to pos. This is a pure virtual function
* @parameter move determines the direction to move. The default value is 'A' for auto */
virtualvoid move(char move = 'A') = 0;
/** Virtual Destructor */
~Person(){}
protected:
Position* pos;
char type;
private:
};