In file included from main.cpp:16:0:
date.h: In member function 'std::__cxx11::string Date::Removeint(int) const':
date.h:28:49: error: invalid use of const_cast with type 'char', which is not a pointer, reference, nor a pointer-to-data-member type
newString = const_cast<char>(value % 10 + 48) + newString;
^
date.h: In constructor 'Date::Date(int, int, int)':
date.h:5:17: error: 'Date::year' will be initialized after [-Werror=reorder]
int day, month, year;
^~~~
date.h:5:10: error: 'int Date::month' [-Werror=reorder]
int day, month, year;
^~~~~
date.h:51:1: error: when initialized here [-Werror=reorder]
Date(int year, int month, int day): year(year), month(month), day(day) {}
^~~~
date.h:5:10: error: 'Date::month' will be initialized after [-Werror=reorder]
int day, month, year;
^~~~~
date.h:5:5: error: 'int Date::day' [-Werror=reorder]
int day, month, year;
^~~
date.h:51:1: error: when initialized here [-Werror=reorder]
Date(int year, int month, int day): year(year), month(month), day(day) {}
^~~~
cc1plus: all warnings being treated as errors
|