In file included from main.cpp:16:0:
date.h: In constructor 'Date::Date(int, int, int)':
date.h:6:22: error: 'Date::day' will be initialized after [-Werror=reorder]
int year, month, day;
^~~
date.h:6:15: error: 'int Date::month' [-Werror=reorder]
int year, month, day;
^~~~~
date.h:9:5: error: when initialized here [-Werror=reorder]
Date(int year, int month, int day):day(day), month(month), year(year) {
^~~~
date.h:6:15: error: 'Date::month' will be initialized after [-Werror=reorder]
int year, month, day;
^~~~~
date.h:6:9: error: 'int Date::year' [-Werror=reorder]
int year, month, day;
^~~~
date.h:9:5: error: when initialized here [-Werror=reorder]
Date(int year, int month, int day):day(day), month(month), year(year) {
^~~~
cc1plus: all warnings being treated as errors
|