delorie.com/archives/browse.cgi | search |
From: | Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Anomolies old Gcc allowed(also problem) |
Organization: | Pin Eight Software http://pineight.8m.com/ |
Message-ID: | <9c61rs8nt9qvf1jaups7qik6qcj0s95al5@4ax.com> |
References: | <Ytg9=2e00Uw9II9F1u AT andrew DOT cmu DOT edu> |
X-Newsreader: | Forte Agent 1.7/32.534 |
MIME-Version: | 1.0 |
Lines: | 57 |
X-Trace: | +4UIu9xvKu4PZQdaN70pbPtgd92ZU7byzhhGuYnoV2quWanz3g1iYEJgDQpDsHxYSIVnZe+Eq2ve!G8OKYNieAfWpwBgDdhX2sxWVwxwYcO0yaGh6KI1+sn5CcRoayG5nP9EOjHBGRRNTsNFc28tycLu1!2kZhFxM= |
X-Complaints-To: | abuse AT gte DOT net |
X-Abuse-Info: | Please be sure to forward a copy of ALL headers |
X-Abuse-Info: | Otherwise we will be unable to process your complaint properly |
NNTP-Posting-Date: | Sat, 02 Sep 2000 06:13:46 GMT |
Distribution: | world |
Date: | Sat, 02 Sep 2000 06:13:46 GMT |
Path: | news.mv.net!newspeer.phoen-x.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.direct.ca!look.ca!paloalto-snh1.gtei.net!news.gtei.net!dfiatx1-snr1.gtei.net.POSTED!not-for-mail |
Xref: | news.mv.net comp.os.msdos.djgpp:103069 |
On Sat, 2 Sep 2000 01:40:18 -0400, James W Sager Iii <sager+@andrew.cmu.edu> wrote: >Mp is a structure containing: > >int *blk; >int *vt_wall; >int *hz_wall; > > >Mp.blk=realloc(Mp.blk,10000*4*Mp.max); >Mp.vt_wall=realloc(Mp.vt_wall,10000*4*Mp.max); >Mp.hz_wall=realloc(Mp.hz_wall,10000*4*Mp.max); > >Recieved compiler errors: > ) Error: ANSI C++ forbids implicit conversion from `void *' in assignment > ) Error: ANSI C++ forbids implicit conversion from `void *' in assignment > ) Error: ANSI C++ forbids implicit conversion from `void *' in assignment > >What does the above mean? It means you're trying to assign a void *value to a something_else *variable. ANSI C++ doesn't allow this. >Does it mean I need to malloc before I remalloc? It means you should be using new and delete instead of malloc() in a C++ program. >This would require a coding overhaul on code I forget. >I can't find any solution but this, yet I find it odd >a programming language would switch conventions... C++ had no conventions until ANSI C++. GCC simply adopted the standard convention. >Upgrading from my ghetto version of Djgpp to the newer one, I noticed >some odd things the previous compiler let me play off. That's because those "odd things" are violations of ANSI C++, such as: >*It allowed me to give content for a constructor of a class without >specifying in the .h that there was a constructor to begin with. > >*(allegro only) Allowed direct access to datafiles when using the >blit command. This is the same problem as (void *)crap. Allegro is a C library. You have to cast. -- MS (n) 1. A debilitating and surprisingly widespread affliction that renders the sufferer barely able to perform the simplest task. 2. A disease, multiple sclerosis (see). This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |