www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/22/01:45:41

From: "Todd Rowan" <rowan3 AT ix DOT netcom DOT com_nospam>
Newsgroups: comp.lang.c,comp.os.msdos.djgpp
Subject: Re: Casting void pointers
Date: Sun, 21 Jun 1998 22:21:31 -0700
Organization: ICGNetcom
Lines: 19
Message-ID: <6mkq0j$c0h@dfw-ixnews5.ix.netcom.com>
References: <6mkaos$k7o AT dfw-ixnews6 DOT ix DOT netcom DOT com> <358DC1FA DOT 443E297D AT cs DOT com>
NNTP-Posting-Host: stl-wa50-53.ix.netcom.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

It does help, thanks. I'm using the GUI routines from Allegro and building
my own dialog objects. The dialog object structure has three void pointers
for custom elements. One of my custom elements is a function. The code was
working without the cast, but I wanted to know how to do it just in case.


John M. Aldrich wrote in message <358DC1FA DOT 443E297D AT cs DOT com>...
>Todd Rowan wrote:
>>
>> How do you explicity cast a void pointer to a function pointer? Or do you
>> even need to cast void pointers manually?
>
>If you want to be able to access the data pointed to by a void pointer,
>then you must typecast it to something.  I'm not entirely sure why you'd
>want to store a function pointer in a void pointer, but you'd cast it in
>the same way that you would declare a function pointer:



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019