casting pointers to functions
    Michael J Zehr 
    tada at e40-008-7.MIT.EDU
       
    Wed Nov 21 07:32:01 AEST 1990
    
    
  
Continuing the discussion of pointers to functions: you can cast them to
any other pointer to function, and cast them back, and use them.  i'm
having a problem doing this, however (using the VAXC compiler for VMS,
some fairly recent version).
I tried the example in K&R2 (early edition, with the black stripe on the
cover) for qsort where they first mention pointers to functions, and
some other variations on it.  My compiler always says: target or source
of conversion is non-computable.
I think the compiler is broken, but before i complain to DEC, could
someone post an example of the right way to cast a function to one kind
of pointer, then back, and call it?
thanks,
michael j zehr
(i just know i'm going to regret asking this right before i leave my
computer for a few days.  please see if someone has posted an example
before mailing me one so i don't get 100 messages.)
    
    
More information about the Comp.std.c
mailing list