![]() |
|
|
|||||||
![]() |
C Programming - Re: Why no generic function pointers? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
"copx" <> writes:
> Why doesn't the C standard include generic function pointers? [...] Remember that there are two distinct ways in which void* is a "generic" object pointer. One is that a conversion from foo* to void* and back again is guaranteed to yield the original value, where foo is any object or incomplete type. As others have mentioned, *all* function pointers behave this way. If you want a single generic function pointer type, I suggest void(*)(void), just because it's the simplest (a typedef could be helpful). The other way is that conversions between void* and foo* (foo as above) may be done implicitly. This isn't the case for function pointers, but that's just a matter of syntactic convenience. -- Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst> Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister" Keith Thompson |
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| equivalent function for itoa in Linux gcc compiler | suse | Software | 0 | 03-06-2009 05:30 AM |
| How to assign a returns value of a javascript function to a hiddenfield in a webpart | Chander | Software | 0 | 12-20-2007 09:14 AM |
| MS Access not recognising Date() function | tessythampan | Software | 0 | 08-28-2006 11:51 AM |
| I lost the "Help and Support" function from my start menu | Keith | A+ Certification | 1 | 03-14-2005 03:05 PM |
| Netflix Moving to Generic Discs. | One-Shot Scot | DVD Video | 28 | 11-23-2004 11:14 PM |