void** == any type?
I believe void** is a pointer to a pointer of any type.
These are mostly used as return values so that the function called can return any type.
None of this is definitive of course. Just what I see when I use them.
These are mostly used as return values so that the function called can return any type.
None of this is definitive of course. Just what I see when I use them.
void ** is a pointer to a pointer. Period. To prevent bias towards particular interpretation, it is a void pointer, but since all pointers are pointers, it''s largely syntactic sugar.
You can (and often do/must) cast a pointer from one type to another to obtain the desired semantics. void pointers are also useful for writing functions that must accept pointer addresses to a variety of structures (like almost all Win32 functions seem to do - except they boneheadedly use long pointers instead).
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!
You can (and often do/must) cast a pointer from one type to another to obtain the desired semantics. void pointers are also useful for writing functions that must accept pointer addresses to a variety of structures (like almost all Win32 functions seem to do - except they boneheadedly use long pointers instead).
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!
IIRC, long pointers are left over from the 16-bit days when they had 16-bit pointers(near pointers or just pointers) and 32-bit pointers(far pointers or long pointers).
------------------------------
BASIC programmers don''t die, they just GOSUB and don''t return.
------------------------------
BASIC programmers don''t die, they just GOSUB and don''t return.
quote:Original post by Exellon
How do you define something as a "long" pointer anyway?
You don''t. Not on 32-bit Windows, anyway.
[C++ FAQ Lite | ACCU | Boost | Python]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement