www.digitalmars.com         C & C++   DMDScript  

D - Cant deref any typedef

reply Joe Battelle <Joe_member pathlink.com> writes:
Ok here's the real problem with typedefs, and it is not specific to delegates or
function pointers.  You can't dereference them.

this won't compile: pf.d(7): can only * a pointer, not a 'IP'
typedef int* IP;

int main(char argv[][])
int i = 5;
IP ip = (IP) &i; 
return 0;
Aug 22 2002
parent "cblack01" <cblack01 cox.net> writes:
I've encountered this problem with C++ templates and it can make things
difficult.  If we can add a reference to a typedef, it stands to reason that
we should be able to dereference them as well.

Aug 24 2002