X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Martin Ambuhl Newsgroups: comp.os.msdos.djgpp Subject: Re: missing ANSI functions in memory.h Date: Tue, 17 Apr 2007 13:29:17 -0400 Lines: 34 Message-ID: <58kegmF2gqrdnU1@mid.individual.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net t/4MpP/KExcIvOJbYvxMSAyOlaevDf+F8Eq8pBMJjg6ucU0shD User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) In-Reply-To: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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 ) 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 memset and memcpy are prototyped in > The documentation I saw in MSDN said it was an ANSI function. They are ISO (and ANSI) functions, but > when I #included 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 . 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.