delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
NNTP-Posting-Date: | Tue, 17 Apr 2007 13:44:27 -0500 |
Date: | Tue, 17 Apr 2007 11:44:27 -0700 |
From: | Jim Michaels <NOSPAMFOR-jmichae3- AT yahoo DOT com> |
User-Agent: | Thunderbird 1.5.0.10 (Windows/20070221) |
MIME-Version: | 1.0 |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: missing ANSI functions in memory.h |
References: | <mo2dnaEnpYOFn7jbnZ2dnUVZ_segnZ2d AT comcast DOT com> <58kegmF2gqrdnU1 AT mid DOT individual DOT net> |
In-Reply-To: | <58kegmF2gqrdnU1@mid.individual.net> |
Message-ID: | <6fidncRj4KsWiLjbnZ2dnUVZ_vfinZ2d@comcast.com> |
Lines: | 38 |
NNTP-Posting-Host: | 24.20.110.103 |
X-Trace: | sv3-psPKaRt0Dtz1eQQy73+BPa7uvbUt2FyCKZiz53XmVfEfM56QGNIr6HZpfXWwHaIu5Ba99Op2naba6Mx!9LBHRXWMPu5kz76nPaA8ElBLCLrzfwmIf4Ln0STvmQRYG4viOSht99Cp9F8G7QMvsNeOxb/FdWTU!JJwHZICz4u97u2a5P8mhEfBtnxYJ+Q== |
X-Complaints-To: | abuse AT comcast DOT net |
X-DMCA-Complaints-To: | dmca AT comcast DOT net |
X-Abuse-and-DMCA-Info: | Please be sure to forward a copy of ALL headers |
X-Abuse-and-DMCA-Info: | Otherwise we will be unable to process your complaint properly |
X-Postfilter: | 1.3.34 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Martin Ambuhl wrote: > Jim Michaels wrote: >> I tried to find the proper memory.h in all the files I could, but I >> didn't seem to find anything. > > There is no memory.h (or <memory.h>) in C. If you ever had one, it was > an implementation-specific extension. > >> malloc is defined, calloc is defined, free is defined. but where are >> the other functions like memset and memcpy? > > The malloc, calloc, realloc, free family is prototyped in <stdlib.h> > memset and memcpy are prototyped in <string.h> > >> The documentation I saw in MSDN said it was an ANSI function. > > They are ISO (and ANSI) functions, but > >> when I #included <memory.h> > > <memory.h> is not. > >> and compiled with DJGPP's gcc, it gave me the error: >> In copy constructor 'var_array::var_array(const var_array&)': >> 124.cc(20) Error: error: 'memcpy' was not declared in this scope > > Oops! that is a C++ warning. C++ is a different language from C, and > has its own newsgroup <news:comp.lang.c++>. If your intent is to write > C++, go to that newsgroup. If your intent is to write C, learn to use > gcc so it compiles C. > >> in MS's implementation it was defined in both memory.h and string.h >> >> I am not sure what the ANSI standard did say however. hmm. I am using DJGPP. this is what rhide compiles .cc files with by default. I know of no way to fix this. should it be using gxx instead? I don't know the difference.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |