Re: typedef function with void parameters
- From: William Xu <william.xwl@xxxxxxxxx>
- Date: Thu, 13 Dec 2007 23:49:13 +0900
Chris Dollin <chris.dollin@xxxxxx> writes:
So, which do you want -- a function taking a `void*` or a function taking
a `char*`? They're not compatible types. Pick one.
Oh, i thought that most pointer types could be converted/stored into
void pointer. I'm trying to wrap different function pointers into FUNC,
like,
,----
| int foo(char *p){}
| int bar(int *p){}
|
| typedef int (*FUNC)(void *);
|
| FUNC f1 = foo, f2 = bar;
`----
So, this is not allowed?
--
William
http://williamxu.net9.org
.
- Follow-Ups:
- Re: typedef function with void parameters
- From: Eric Sosman
- Re: typedef function with void parameters
- From: Ben Bacarisse
- Re: typedef function with void parameters
- From: tonnitielens
- Re: typedef function with void parameters
- From: Mark Bluemel
- Re: typedef function with void parameters
- References:
- typedef function with void parameters
- From: William Xu
- Re: typedef function with void parameters
- From: Chris Dollin
- typedef function with void parameters
- Prev by Date: Re: Help me, a friend of mine wrote a program in C# and I wrote the same program in C..His is faster than mine on the same machine...How Come ?
- Next by Date: Re: Optimiser question
- Previous by thread: Re: typedef function with void parameters
- Next by thread: Re: typedef function with void parameters
- Index(es):
Relevant Pages
|