🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #8826

Algo tipo realloc en C++

#8826
From: Javicho
Date: Thu, 26 Sep 2002 09:38
16 lines
1311 bytes
Hola,

Me gustaria saber si existe algo parecido al realloc de C en C++.

tengo creado un buffer de memoria con new, en ciertas condiciones puedo 
necesitar que el tamanio se deba aumentar. La solucion esta en hacer un 
nuevo new reservando mas memoria, copiar el buffer primero en el grande y 
liberarlo. Pero quisiera ver si hay forma de hacer esto con alguna funcion, 
o si existe algo parecido a la clase Vector de Java.

Gracias y Saludos


-- 
jdiego#ARROBA#grpss.ssr.upm.es
Technical Details
Message-ID: <3d92d41e@news.upm.es>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!isdnet!news.rediris.es!news-2.rediris.es!138.100.251.9.MISMATCH!news.upm.es!138.4.40.3

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII-7-bit
X-Google-Thread: f86c8,af7bf8d53dac2e00,start
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-09-26 02:30:06 PST
From: Javicho <javicho@enfrente.de.ordenador>
Subject: Algo tipo realloc en C++
Newsgroups: es.comp.os.linux.programacion
Date: Thu, 26 Sep 2002 11:38:49 +0200
Lines: 16
Organization: GRPSS-UPM
User-Agent: KNode/0.6.1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Host: 138.4.40.3
Message-ID: <3d92d41e@news.upm.es>
X-Trace: 26 Sep 2002 11:32:14 +0100, 138.4.40.3
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!isdnet!news.rediris.es!news-2.rediris.es!138.100.251.9.MISMATCH!news.upm.es!138.4.40.3