delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/04/13/11:00:36.1

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Function overloading ?
Date: 13 Apr 2004 14:54:30 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 16
Message-ID: <c5guv6$g9v$3@nets3.rz.RWTH-Aachen.DE>
References: <c5guns$n1r$1 AT reader11 DOT wxs DOT nl>
NNTP-Posting-Host: accip02.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1081868070 16703 137.226.33.41 (13 Apr 2004 14:54:30 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 13 Apr 2004 14:54:30 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

PT <ptalloen AT hotmail DOT com> wrote:

> Following code fails to compile , ... declaration of C function 'int
> test()' conflicts with previous declaration 'int test(int*)'...
[...]

Of course it does.  C doesn't support overloaded functions, so neither
does C++ inside an extern "C" { ... } section.

So either lose that extern "C" block, or rename one of the functions
to give them different names.


-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019