delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/23/04:15:12

Message-ID: <c=GB%a=_%p=Indigo_Active_Vi%l=CRIANLARICH-970623081856Z-221@crianlarich.Indigo>
From: Robert Humphris <r DOT humphris AT indigo-avs DOT com>
To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>,
"'Guilherme Silveira'"
<thedarkage AT mail DOT geocities DOT com>
Subject: RE: Callbacks
Date: Mon, 23 Jun 1997 09:18:56 +0100
Encoding: 38 TEXT

>Please, can you give me an example with a function that returns an int and
>got 2 parameters, one array of chars (70 chars) and one integer?

okay....

>	typedef int ( *SILVEIRAS_FN )( char array[], int number  );

then 

// prototype the functions
int someFunction( char stuff[], int something );
int otherFunction( char things[], int elephant );

void main()
{
    SILVEIRAS_FN  pfnCallback;

    ....

	pfnCallback = someFunction;

	pfnCallback();
}

// define the functions that you prototyped earlier



Rob Humphris

>
>---------------------------------------------------------------
>Guilherme Silveira - Sao Paulo - Brasil
>carlos AT usway DOT com - thedarkage AT mail DOT geocities DOT com
>http://www.geocities.com/SiliconValley/Way/5441/
>18/09/1981 - Until Today...
>
>

- Raw text -


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