home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!cs.utexas.edu!geraldo.cc.utexas.edu!slcs.slb.com!aa.cad.slb.com!bl.cad.slb.com!nntpserver!shibuya
- From: shibuya@bl.applicon.slb.com (Hiroto Shibuya)
- Subject: Variable length array in C++
- Message-ID: <SHIBUYA.92Dec28120216@chute.bl.applicon.slb.com>
- Sender: usenet@mailhost.bl.cad.slb.com (USENET Administrator)
- Reply-To: shibuya@bl.applicon.slb.com
- Organization: Applicon; Billerica, MA (USA)
- Distribution: comp
- Date: Mon, 28 Dec 1992 17:02:16 GMT
- Lines: 23
-
- Question from C minded programmer.
-
- What is a simple way in C++ to implement variable length array - an
- array which grow in size as needed? In C, I often use realloc to
- reallocate an array to bigger size, but in C++, there is no
- corresponding "renew" (?). Do I have to revert to malloc and realloc?
- My understanding was that I never have to use malloc in C++.
-
- Description of class "Blocks" in USL standard components sounds like
- what I need but I don't have access to that library. So I appreciate
- if anybody could tell me what is the common technique in C++ to
- implement this kind of data type. I just want to have simple array
- and do not want to make list out of it. Thanks in advance.
- --
- Hiroto Shibuya
-
- Applicon Inc.
- Billerica, MA
- U.S.A.
-
-
-
-
-