|
编译时出错为 :[root@localhost library]# g++ -o library library.cpp
library.cpp: In function `std: stream& operator<<(std: stream&, const std::list<T, std::allocator<_CharT> >&)':
library.cpp:125: error: expected `;' before "ref"
library.cpp:126: error: `ref' undeclared (first use this function)
library.cpp:126: error: (Each undeclared identifier is reported only once for each function it appears in.)
library.cpp: In function `std: stream& operator<<(std: stream&, const std::list<T, std::allocator<_CharT> >&) [with T = Author]':
library.cpp:146: instantiated from here
library.cpp:125: error: dependent-name ` std::list<T,std::allocator<_CharT> >::iterator' is parsed as a non-type, but instantiation yields a type
library.cpp:125: note: say `typename std::list<T,std::allocator<_CharT> >::iterator' if a type is meant
library.cpp: In function `std: stream& operator<<(std: stream&, const std::list<T, std::allocator<_CharT> >&) [with T = Patron]':
library.cpp:150: instantiated from here
library.cpp:125: error: dependent-name ` std::list<T,std::allocator<_CharT> >::iterator' is parsed as a non-type, but instantiation yields a type
library.cpp:125: note: say `typename std::list<T,std::allocator<_CharT> >::iterator' if a type is meant |
|