15 HasName() { name =
new char[1]; name[0] =
'\0'; };
26 name =
new char[strlen(givenname) + 1];
27 strcpy(name, givenname);
33 const char*
getName()
const {
return name; };
This is the base class for any object that has a name.
Definition: hasname.h:10
const char * getName() const
This will return a null terminated text string containing the name of the object.
Definition: hasname.h:33
virtual ~HasName()
This is the default HasName destructor.
Definition: hasname.h:20
HasName()
This is the default HasName constructor.
Definition: hasname.h:15
HasName(const char *givenname)
This is the HasName constructor for a specified name.
Definition: hasname.h:25