1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
In file included from 1,5,1-1,20.cpp:2:0:
Sales_item.h:56:20: warning: defaulted and deleted functions only available with -std=c++0x or -std=gnu++0x [enabled by default]
Sales_item.h:70:27: error: ISO C++ forbids initialisation of member ‘units_sold’ [-fpermissive]
Sales_item.h:70:27: error: making ‘units_sold’ static [-fpermissive]
Sales_item.h:70:27: error: ISO C++ forbids in-class initialisation of non-const static member ‘units_sold’
Sales_item.h:71:22: error: ISO C++ forbids initialisation of member ‘revenue’ [-fpermissive]
Sales_item.h:71:22: error: making ‘revenue’ static [-fpermissive]
Sales_item.h:71:22: error: ISO C++ forbids in-class initialisation of non-const static member ‘revenue’
1,5,1-1,20.cpp: In function ‘int main()’:
1,5,1-1,20.cpp:7:14: error: no match for ‘operator<<’ in ‘std::cin << book’
1,5,1-1,20.cpp:7:14: note: candidates are:
Sales_item.h:128:1: note: std::ostream& operator<<(std::ostream&, const Sales_item&)
Sales_item.h:128:1: note: no known conversion for argument 1 from ‘std::istream {aka std::basic_istream<char>}’ to ‘std::ostream& {aka std::basic_ostream<char>&}’
/usr/include/c++/4.6/ostream:528:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)
/usr/include/c++/4.6/ostream:523:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)
/usr/include/c++/4.6/ostream:510:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)
/usr/include/c++/4.6/bits/ostream.tcc:323:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)
/usr/include/c++/4.6/ostream:493:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)
/usr/include/c++/4.6/ostream:473:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)
/usr/include/c++/4.6/ostream:468:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)
/usr/include/c++/4.6/ostream:462:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)
/usr/include/c++/4.6/ostream:456:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)
/usr/include/c++/4.6/ostream:451:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
/usr/include/c++/4.6/bits/basic_string.h:2693:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
|