
17 Apr
2006
17 Apr
'06
5:32 p.m.
the thing is i have list<list<string> > examples. template <typename T, template <typename ELEM,typename = std::allocator<ELEM> > class CONT
void testFunc(const CONT<CONT<T> >& container) { std::find_if(container.begin(), container.end(), ( bind(&CONT<T>::back(), _1) == var(targetValue) ) ); } std::vector<std::vector<std::string> > examples; testFunc<std::string, std::vector>(examples); since list don't have indexing i want to see if the last item in the container is. . However i get this error... cannot call member function `typename _Alloc::reference std::vector<_Tp, _Alloc>::back() [with _Tp = std::string, _Alloc = std::allocator<std::string>]' without object
6992
Age (days ago)
6992
Last active (days ago)
0 comments
1 participants
participants (1)
-
chun ping wang