🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #63

Re: Find size of Array?

#63
From: Mr Pete
Date: Sun, 17 Jun 2001 13:18
44 lines
2829 bytes
also (i'm new) the vector deletes itself automatically which saves loads

Mr Pete



Warren S. Wyght <wswyght@telusplanet.net> wrote in message
news:xLK66.2546$FH5.272485@news0.telusplanet.net...
> I see I am going to have to read up on vectors.
>
> Thanks for your help
>
>
>
> --
> Society is produced by our wants, and government by our wickedness;
> the former promotes our POSITIVELY by uniting our affections,
> the latter NEGATIVELY by restraining our vices. The one encourages
> intercourse,
> the other creates distinctions. The first a patron, the last a punisher.
> COMMON SENSE
> Thomas Paine
> Philadelphia, February 14, 1776
> Jon Bell <jtbell@presby.edu> wrote in message
news:G6wx0D.Cvs@presby.edu...
> > 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
t  ]
> >
  http://www2.PetitionOnline.com/dejanews/petition.html         ]
>
>
Technical Details
Message-ID: <3b2cb5c5@news.telinco.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!dispose.news.demon.net!demon!mk-nntp-1.news.uk.worldonline.com!news.telinco.net!ppp-1-185.cvx3.telinco.net
References: <MsK66.2480$FH5.269435@news0.telusplanet.net> <G6wx0D.Cvs@presby.edu> <xLK66.2546$FH5.272485@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: fa7a6,230db20a608e15f9
X-Google-Attributes: gidfa7a6,public
X-Google-Thread: 109fba,6b63eb7bf8d9f816,start
X-Google-Attributes: gid109fba,public
X-Google-Thread: 10d4ba,230db20a608e15f9
X-Google-Attributes: gid10d4ba,public
X-Google-ArrivalTime: 2001-06-17 20:07:49 PST
From: "Mr Pete" <PeteAtPTheobaldDotCoDotUk>
Newsgroups: alt.comp.lang.learn.c-c++,att.lang.c++,comp.lang.c++,no.it.programmering.c++
References: <MsK66.2480$FH5.269435@news0.telusplanet.net> <G6wx0D.Cvs@presby.edu> <xLK66.2546$FH5.272485@news0.telusplanet.net>
Subject: Re: Find size of Array?
Date: Sun, 17 Jun 2001 14:18:17 +0100
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Original-NNTP-Posting-Host: ppp-1-185.cvx3.telinco.net
Message-ID: <3b2cb5c5@news.telinco.net>
X-Original-Trace: 17 Jun 2001 14:51:01 +0100, ppp-1-185.cvx3.telinco.net
NNTP-Posting-Host: news.telinco.net
X-Trace: 17 Jun 2001 14:53:35 +0100, news.telinco.net
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!dispose.news.demon.net!demon!mk-nntp-1.news.uk.worldonline.com!news.telinco.net!ppp-1-185.cvx3.telinco.net