tags:

views:

53

answers:

2
- (void)setPropertyValue:(const *void)inValue forID:(UInt32)propertyID {

}

The compiler doesn't like the const *void, for some reason. When I have that, it says:

error: expected ')' before 'void'

When I make the parameter like (UInt32)foo there is no problem. Does const *void only work in functions?

I need a parameter which can be a "pointer to anything" like UInt32, Float64, etc.

+6  A: 

Do you mean const void *?

David Gelhar
+5  A: 

Use

(const void*)

instead. (const * void) doesn't work in C++ / C either.

Yuji
my fault. I see... const isn't the datatype. void is it (sort of).
dontWatchMyProfile
`void *` is the datatype - a pointer to data of unspecified type. `const` is a qualifier that means the thing being pointed to must not be changed.
David Gelhar