|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - pointers and integers
D doesn't allow to convert integers to pointers. This is great in general, however, I've came to some problems when messing with API - things like MAKEINTRESOURCE and MAKEINTATOM require explicitly defined integer value to be of type char*... not only these, but there are some constants like IDI_APPLICATION that also should be char* while having the very exact value; unfortunately, I don't see any way to do this in D, currently, other than making them all ints and let user do the proper casting where necesarry. Walter, do you have any suggestions how to do this in other way? Dec 29 2001
Hmm, it won't let you do a cast, a-la:
cast(void*)3
?
"Pavel Minayev" <evilone omen.ru> wrote in message
news:a0lg1n$2c7b$1 digitaldaemon.com...
Dec 29 2001
"Walter" <walter digitalmars.com> wrote in message news:a0m78n$2pfo$2 digitaldaemon.com... Dec 30 2001
|