Article View: alt.comp.lang.learn.c-c++
Article #44Re: Find size of Array?
From: Jon Bell
Date: Tue, 09 Jan 2001 20:31
Date: Tue, 09 Jan 2001 20:31
13 lines
1655 bytes
1655 bytes
Warren S. Wyght <wswyght@telusplanet.net> wrote: >How do I find the size of an Array once the array was created by either >malloc or new. You can't. You have to keep track of it yourself. Or, instead of using an array, use std::vector or std::string, both of which keep track of their sizes, and can tell it to you via the size() member function. -- Jon Bell <jtbell@presby.edu> Presbyterian College Dept. of Physics and Computer Science Clinton, South Carolina USA [ Help try to keep the Deja.com archive alive! Sign the petition at ] [ http://www2.PetitionOnline.com/dejanews/petition.html ]
Technical Details
Message-ID:
<G6wx0D.Cvs@presby.edu>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!feed-out.newsfeeds.com!newsfeeds.com!feed.newsfeeds.com!newsfeeds.com!feed.textport.net!newsfeed.stanford.edu!presby.edu!jtbellReferences:
<MsK66.2480$FH5.269435@news0.telusplanet.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4ba,230db20a608e15f9 X-Google-Attributes: gid10d4ba,public X-Google-Thread: 114592,230db20a608e15f9 X-Google-Attributes: gid114592,public X-Google-Thread: 109fba,230db20a608e15f9 X-Google-Attributes: gid109fba,public X-Google-Thread: fa7a6,230db20a608e15f9 X-Google-Attributes: gidfa7a6,public X-Google-ArrivalTime: 2001-01-09 12:36:04 PST Newsgroups: alt.comp.lang.learn.c-c++,att.lang.c++,comp.lang.c++,no.it.programmering.c++ Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!feed-out.newsfeeds.com!newsfeeds.com!feed.newsfeeds.com!newsfeeds.com!feed.textport.net!newsfeed.stanford.edu!presby.edu!jtbell From: jtbell@presby.edu (Jon Bell) Subject: Re: Find size of Array? Message-ID: <G6wx0D.Cvs@presby.edu> Date: Tue, 9 Jan 2001 20:31:24 GMT References: <MsK66.2480$FH5.269435@news0.telusplanet.net> Organization: Presbyterian College, Clinton, South Carolina USA Lines: 13