delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | "Jon Bills" <jon_bills AT hotmail DOT com> |
Newsgroups: | comp.lang.c++,comp.os.msdos.djgpp |
Subject: | Re: ** Pointer thingie's <= what's up with the double *? |
Date: | Fri, 14 Dec 2001 15:35:45 +0000 (UTC) |
Organization: | Mailgate.ORG Server - http://www.Mailgate.ORG |
Lines: | 36 |
Message-ID: | <1bef4d26792738cec5dfc612b91aa902.37623@mygate.mailgate.org> |
References: | <vTkS7.469287$Jy2 DOT 33400140 AT news DOT quicknet DOT nl> <Xns9177526CC2A82ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <wTmS7.3829$tg4 DOT 48021 AT vixen DOT cso DOT uiuc DOT edu> <Xns917766F857AB6ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> |
NNTP-Posting-Host: | 195.99.244.69 |
X-Trace: | news.mailgate.org 1008318984 27709 195.99.244.69 (Fri Dec 14 16:35:45 2001) |
X-Complaints-To: | abuse AT mailgate DOT org |
NNTP-Posting-Date: | Fri, 14 Dec 2001 15:35:45 +0000 (UTC) |
Injector-Info: | news.mailgate.org; posting-host=195.99.244.69; posting-account=37623; posting-date=1008318984 |
User-Agent: | Mailgate Web Server |
X-URL: | http://www.Mailgate.ORG |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"A. Sinan Unur" <asu1 AT cornell DOT edu> wrote in message news:Xns917766F857AB6ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8... > "Mike Pilat" <pilat AT uiuc DOT edu> wrote in > news:wTmS7.3829$tg4 DOT 48021 AT vixen DOT cso DOT uiuc DOT edu: > > > "A. Sinan Unur" <asu1 AT cornell DOT edu> wrote > >> "Emile Bosch" <emilebosch AT hotmail DOT com> wrote > >> > void** ptr; //? Double **? > >> > >> i don't think that is valid. > >> AFAIK, you can't have pointers to void pointers. > > > > You can indeed have void**... for example, the COM IUnknown method > > QueryInterface(..) takes a void** as a parameter into which your > > interface pointer goes. > > See http://www.eskimo.com/~scs/C-faq/q4.9.html That's the C FAQ. The rules for pointer-to-void are different for C++. If the OP hadn't cross-posted, we wouldn't have this confusion. From a C++ perspective, there is nothing wrong with void** type. You can't do much with it until it's cast to a particular type. It's a pretty bad idea to use void** in C++ as it completely bypasses the type safety system. Note that assigning a pointer-to-void to pointer-to-type in C++ requires a cast. Jon. -- Posted from [195.99.244.69] via Mailgate.ORG Server - http://www.Mailgate.ORG
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |