I have a questions about classes in C++. I'm working on a homework assignment where I have a class called Person and a derived class called Doctor. I also have two other classes that are called Date and Bill. I'm suppose to create a class drived from Person and call it Patient.The only thing thats tripping me up is that the Patient class should hold information from the Bill class and the Date class. I was thinking that I should create nonmember functions in Bill and Date that would allow a Patient object to access the members in both class, but I'm not sure if that's legal.
dirtydit27 0 Newbie Poster
tinstaafl 1,176 Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.