From: Luke Dunstan <coder_infidel@ho...> - 2003-04-02 10:07:15
>From: "Lorne Easton" <leaston@...>
>Subject: [Mingw-users] Multiple casts..
>Date: Wed, 2 Apr 2003 11:12:34 +1000
>Apologies if I have posted here inappropriately:
>Does gcc (I am using the version that came with the 2.0.3 release of Mingw)
>support multiple casts? It does not seem to. In this case:
>yields a DWORD type (the type of IPHdr.Source). Am I doing something wrong
You can't static_cast a DWORD to a struct (like in_addr). Using
reinterpret_cast again should work, or you could do something like:
addr.S_addr = reinterpret_cast<ICMPPacket *>(&rcvPacket)->IPHdr.Source;
MSN Instant Messenger now available on Australian mobile phones. Go to
Get latest updates about Open Source Projects, Conferences and News.