PDA

View Full Version : Default Date in c++ ?



saneha
04-29-2011, 08:52 AM
Default Date?
Dear Sir, I did not understand that in date class example, why we choose to take default as static data member, please elaborate. Thanks

Vuhelper
04-29-2011, 08:53 AM
As defaultDate is a class wide variable and we want to set the default date for all the objects when created, therefore defaultDate is set as static data member.

Xpert
04-29-2011, 03:23 PM
Good answer...................