Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


void** == any type?

This topic is 5899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post

Link to post
Share on other sites
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!

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!