Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Functions taking pointers to different types as arguments
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Mikhail Teterin, post: 2398159"] Hello! I'd like to have a variable of a pointer-to-function type. The two possible values are of type (*)(FILE *) and (*)(void *). For example: getter = straight ? fgetc : gzgetc; [...] nextchar = getter(file); What type should I give to `getter' so that the compiler does not issue warnings about an incompatible value getting assigned to it? Thanks! -mi [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Functions taking pointers to different types as arguments
Top