Newsgroups: comp.lang.c++.moderated
From: kiran <kiran.tange...@googlemail.com>
Date: Wed, 29 Aug 2012 16:44:31 CST
Local: Wed, Aug 29 2012 6:44 pm
Subject: Error in function not detected when not called
Hi have a following class:
public:
};
//The member function is defined as:
template <class T> int List<T>::remove(T& t) { if(isEmpty()) return 0; ListNode<T> q = first; first = first->next; t = q->data; delete q; return 1; }
====================================
The member function incorrectly assigns a ListNode object q to the
I have tried to compile using various optimization levels (O0, O1, O2,
Many thanks,
-- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||