HELP: function prototype with pointer to function as parameter 
Author Message
 HELP: function prototype with pointer to function as parameter

Hello, netter friends:

     I am having problems to declare prototypes for the following
old style  functions:
-------------------------------------------------
int funct1(funct2, var1, int1, char1)
int (*funct2)();
double *var1;
int *int1;
char *char1;
{   Body of function 1  }

int funct2(funct3, var2, int2, char2)
int (*funct3)();
double *var2;
int *int2;
char *char2;
{   Body of function 2  }

int funct3(var3, int3, char3)
double *var3;
int *int3;
char *char3;
{   Body of function 3  }
--------------------------------------------------
     I declared function 1 as:

int funct1(int (*) (), double *, int *, char *);

but the compiler (GCC for LINUX) gives a warning message "function
declaration isn't a prototype". I am wondering what is the correct
prototype declaration for this kind of situation (I hate error
messages and dislike warning messages).

     Any netter can help? Thanks in advance. Both post and e-mail
are OK.

--- Guangxi Wu



Thu, 11 Jul 1996 07:49:20 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Function returning a function-pointer - how to prototype ?

2. Function prototypes for pointers to functions.

3. How to use (pointer to function), and function and pointer to (pointer to function)

4. Help. pointer to function prototype

5. Call a function in a function with name of a function as parameter

6. Pointer Functions and Pointers to Pointer Functions

7. C Prototype for FARPROC function pointer

8. function pointers and prototypes

9. Prototype for function returning funtion pointer

10. Prototype for Functions pointers in Structures

11. How to prototype a function pointer?

12. HOW: Pointer to char array ANSI function prototype

 

 
Powered by phpBB® Forum Software