void value not ignored as it ought to be ???

when i am storing the value of the list.pop_back()
then it says ““void value not ignored as it ought to be””???what that mean??

Hi, to get the last element, use list.back() and then, remove it using list.pop_back()

See http://www.cplusplus.com/reference/list/list/pop_back/ for some details

There is an example given there. Hope you will get what you need. :slight_smile:

Cheers!

thnx…was grt help.:slight_smile:

1 Like
//