S
subramanian
I am a beginner in C++.
Suppose I want to build a class: I have given below the starting code:
class Date {
int day, month, year;
static Date default_date;
};
Someone, kindly, completely tell me how to initialize(ie the definition
of) the static member default_date in the above class and the
constructors needed for this. Also how should I access the members of
default_date ie the syntax to access it. I need the full
implementation. I am asking this is for learning purpose.
Suppose I want to build a class: I have given below the starting code:
class Date {
int day, month, year;
static Date default_date;
};
Someone, kindly, completely tell me how to initialize(ie the definition
of) the static member default_date in the above class and the
constructors needed for this. Also how should I access the members of
default_date ie the syntax to access it. I need the full
implementation. I am asking this is for learning purpose.