Niu Xiao <> writes:
> I saw a lot of codes like:
>
> void foo(void* arg)
> void bar(void** arg)
> f((void*)p)
>
> but what does void pointer mean in c? I just know it stands for
> generic pointer.
Right, it's a generic pointer. I'm not sure what you're asking.
"void" is a special type, an incomplete type that cannot be completed.
You can't have an object of type void; a function that returns void
doesn't return a value.
Type "void*" is a pointer type that can point to any object. An
object of type void* can hold a value of any pointer-to-object type.
Any object type can be implicitly converted to void*, and vice versa.
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.