Welcome! Log In Create A New Profile

Advanced

STL - list<type>::pop_front()

Posted by AndreB 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
STL - list<type>::pop_front()
April 15, 2007 07:29AM
Our beloved prescribed book reckons that this function removes the last element/node from the given list. The question in assignment 1 (i think Q42???) also has this definition as the only possible correct answer - However, documentation (MSDN) on the standard template library list class, quite rightly defines this function as removing the first element/node in a list.
I've tried and tested this by implemeting the pop_front() function and it does remove the first element.
Am I missing something here? Can Malik (book) and the assignment both be wrong, or have I missed the plot completely. confused smiley
Re: STL - list<type>::pop_front()
May 09, 2007 03:31PM
I also spotted this the other day. I have not checked but I would think that you must be right, pop_front() must refer to the first not last element of list. Can one of the lecturers confirm this please, so that their students are not potentially lead astray but an error in the text book?
Re: STL - list<type>::pop_front()
May 09, 2007 07:55PM
Finally some feedback. I had all but given up on this.
Re: STL - list<type>::pop_front()
May 10, 2007 10:29AM
Hi

Yes pop_front() does remove the first element of the list. There is an error in the text book. Although there was a question on this in assignment 1, the STL list is not part of the syllabus and will not be tested on in the exam.

regards
Lazarus Aron
Re: STL - list<type>::pop_front()
May 10, 2007 10:42AM
Thank you for the confirmation.
Re: STL - list<type>::pop_front()
May 10, 2007 03:25PM
Yes, Thank you.
Sorry, only registered users may post in this forum.

Click here to login