Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Type: text/plain;
  charset="iso-8859-1"
From: Emil Briggs <emil@baymountain.com>
To: Ross Smith <rosss@pharos.co.nz>
Subject: Re: limit for # of items created with "new" ?
Date: Tue, 24 Sep 2002 22:39:49 -0400
User-Agent: KMail/1.4.3
References: <79218202D4B9D4118A290002A508E13B79C39A@PNZEXCHANGE>
In-Reply-To: <79218202D4B9D4118A290002A508E13B79C39A@PNZEXCHANGE>
Organization: Baymountain, Inc.
Cc: cygwin@cygwin.com
MIME-Version: 1.0
Message-Id: <200209242239.49861.emil@baymountain.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g8P2dax01712

On Tuesday 24 September 2002 10:28 pm, Ross Smith wrote:
> From: Hans Horn [mailto:hannes@2horns.com]
>
> > // an element of a linked list
> > typedef struct node {
> >   node (int _v, node* _n) : v(_v), next(_n) {}
> >   int   v;
> >   node* next;
> > };
>
> I'm surprised that compiled; the typedef shouldn't be there.
>
> > int main (int argc, char** argv) {
> >   // allocate descriptions of points
> >   char** points = new char*[NUM_POINTS]; assert(points);
>
> The assert is superfluous; new is guaranteed never to return null.
>

Except when you are out of memory.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

