Hi guys I am a new IT guy.my task is to manipulate time and date.I use two separate classes for time and date. Now i need to integarate them, so which one is best Inheritance or containment
ganesh_IT
0
Light Poster
Recommended Answers
Jump to PostI would probably use containment. Don't use the name 'time' because that symbol is already used in time.h
class localtime { }; class date { }; class timedate { localtime tm; date dt; };
All 2 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Fbody
commented:
Agreed, containment is much easier. :)
+1
Fbody
682
Posting Maven
Featured Poster
Ancient Dragon
commented:
Agree :)
+31
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.