Re: [C++] Templates and inheritance
From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 09/28/04
- Next message: Alwyn: "Re: dont understand looping problem"
- Previous message: Thorsten Ottosen: "Re: [C++] Templates and inheritance"
- In reply to: Pedro Graca: "[C++] Templates and inheritance"
- Next in thread: Pedro Graca: "Re: [C++] Templates and inheritance"
- Reply: Pedro Graca: "Re: [C++] Templates and inheritance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 17:47:41 +0100
In article <slrncliuer.usv.hexkid@ID-203069.user.uni-berlin.de>, Pedro
Graca <hexkid@hotpop.com> wrote:
> What am I missing?
<snip>
> void my_push(const T& x) {
> if (top() > x) {
This is the problem. An empty stack has no 'top' value. Stupidly, the
implementation allows the program to crash rather than raise an
exception to indicate the mistake.
Alwyn
- Next message: Alwyn: "Re: dont understand looping problem"
- Previous message: Thorsten Ottosen: "Re: [C++] Templates and inheritance"
- In reply to: Pedro Graca: "[C++] Templates and inheritance"
- Next in thread: Pedro Graca: "Re: [C++] Templates and inheritance"
- Reply: Pedro Graca: "Re: [C++] Templates and inheritance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|