September 19, 2003

invalid reinterpret_cast

To read from files, I used to use,m_nChannels*sizeof(ELECTLOC));
I'm not really sure what to do now, since the (new) compiler gives 'invalid reinterpret_cast'. Ok, I fixed it with[0]),m_nChannels*sizeof(ELECTLOC));
Apparently, the new gcc doesn't treat iterators so kindly. A simlar problem showed up when I tried to do
In this case m_event is an iterator, and even though it technically is a pointer, the new gcc does not like it. I switched it to
and it worked. Which means I could have done &(*m_electlocs.begin()) though that is a lot uglier.

Posted by torque at September 19, 2003 12:43 PM | TrackBack
Post a comment

Remember personal info?