Article View: alt.comp.lang.learn.c-c++
Article #47Re: Find size of Array?
From: Donovan Rebbechi
Date: Tue, 09 Jan 2001 22:22
Date: Tue, 09 Jan 2001 22:22
13 lines
1700 bytes
1700 bytes
On Tue, 09 Jan 2001 20:25:16 GMT, Warren S. Wyght wrote: >How do I find the size of an Array once the array was created by either >malloc or new. You don't. You need to keep track of the size. That's why data structures like vector and string have fields that keep track of this information. Of course, if you use vector<> instead of a pointer array, you can just use the size() method. -- Donovan Rebbechi * http://pegasus.rutgers.edu/~elflord/ * elflord at panix dot com
Technical Details
Message-ID:
<slrn95n3ov.k2t.elflord@panix6.panix.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-hog.berkeley.edu!ucberkeley!newsswitch.lcs.mit.edu!howland.erols.net!panix!news.panix.com!elflordReferences:
<MsK66.2480$FH5.269435@news0.telusplanet.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114592,230db20a608e15f9 X-Google-Attributes: gid114592,public X-Google-Thread: 10d4ba,230db20a608e15f9 X-Google-Attributes: gid10d4ba,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 14:23:49 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-hog.berkeley.edu!ucberkeley!newsswitch.lcs.mit.edu!howland.erols.net!panix!news.panix.com!elflord From: elflord@panix.com (Donovan Rebbechi) Newsgroups: alt.comp.lang.learn.c-c++,att.lang.c++,comp.lang.c++,no.it.programmering.c++ Subject: Re: Find size of Array? Date: 9 Jan 2001 22:22:23 GMT Organization: PANIX Public Access Internet and UNIX, NYC Lines: 13 Message-ID: <slrn95n3ov.k2t.elflord@panix6.panix.com> References: <MsK66.2480$FH5.269435@news0.telusplanet.net> NNTP-Posting-Host: panix6.panix.com X-Trace: news.panix.com 979078943 29903 166.84.0.231 (9 Jan 2001 22:22:23 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: 9 Jan 2001 22:22:23 GMT User-Agent: slrn/0.9.6.3 (NetBSD)