X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Joel Saunders" Newsgroups: comp.os.msdos.djgpp Subject: realloc Date: Sat, 26 Jan 2002 15:58:11 +0000 (UTC) Organization: Mailgate.ORG Server - http://www.Mailgate.ORG Lines: 22 Message-ID: <2c4b72ebe7abd263194147756b698990.62691@mygate.mailgate.org> NNTP-Posting-Host: acb4e412.ipt.aol.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.mailgate.org 1012048683 29308 172.180.228.18 (Sat Jan 26 16:58:11 2002) X-Complaints-To: abuse AT mailgate DOT org NNTP-Posting-Date: Sat, 26 Jan 2002 15:58:11 +0000 (UTC) Injector-Info: news.mailgate.org; posting-host=acb4e412.ipt.aol.com; posting-account=62691; posting-date=1012048683 User-Agent: Mailgate Web Server X-URL: http://mygate.mailgate.org/mynews/comp/comp.os.msdos.djgpp/2c4b72ebe7abd263194147756b698990.62691%40mygate.mailgate.org To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I'm writting a TSR that works with memory. One of the routines, lets the user change the amount of memory they allocated to a different amount. The way this is written now, I get an error. I'll show the pointer, routine and error I get: Ok, you have unsigned char *E_PTR[256] (It's global). Then the routine: void Reallocate_Memory(__dpmi_regs *r) { if((E_PTR[r->h.al] = realloc(E_PTR[r->h.al], r->d.ebx)) != 0) r->h.al = 1; else r->h.al = 0; } Now I get the error: Warning: ANSI C++ forbids implicit conversion from `void *' in assignment I guess I need to put something else after realloc( But what ? -- Posted via Mailgate.ORG Server - http://www.Mailgate.ORG