delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/31/08:55:10

From: Manni Heumann <manni DOT heumann AT gmx DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro LOCK_FUNCTION issue using C++
Date: 31 May 2002 11:42:20 GMT
Lines: 25
Message-ID: <ad7nis$u6peu$1@ID-54749.news.dfncis.de>
References: <3cf704ff_1 AT news DOT iprimus DOT com DOT au>
NNTP-Posting-Host: computer-name.uni-bielefeld.de (129.70.100.226)
Mime-Version: 1.0
X-Trace: fu-berlin.de 1022845340 31679966 129.70.100.226 (16 1428 [54749])
User-Agent: Xnews/5.04.25
X-Face: "c)Go+A65AgR*9'!B)BMLM$kYg6HDG!_g'DAsj*ALo%=kp{X&abs&t\G0F~*r?VRj#|4=6)M.RJPnD]Ql:B<-7A^EAYFpDpZRMoJy?80^3B3b AT DXb%MTyOD.*4wu&Xt6o*+6`r5E
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Jason wrote:

> Why would there be problems with this using C++?  The reason I
> found this was because I'm trying to compile a C++ program using
> the install_int function, but keeps giving this strange (well,
> strange to me) error. 

This is explained somewhere in the Allegro docs, but I can't find it 
right now. The problem is, that

void some_func () {}

is not the same in C and C++. I guess that C takes that as a function 
with a variable number of arguments, while C++ takes it as a function 
with no arguments. I maybe completely wrong here, but that doesn't 
really matter because you can solve the problem by changing the 
functions definition to:

void some_func (...)

Now the code should compile.

Manni
 

- Raw text -


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