Thread View: gnu.gcc.help
1 messages
1 total messages
Started by Maya
Sun, 23 Mar 2003 23:49
A question about casting operators
Author: Maya
Date: Sun, 23 Mar 2003 23:49
Date: Sun, 23 Mar 2003 23:49
22 lines
2525 bytes
2525 bytes
I have the following statement in my program
// from some where in the app
double val = some_number;
std::fstream f;
// the problem code
f.write( reinterpret_cast<char*>(val), sizeof(val) );
From this code I get an error message saying:
Invalid reinterpret_cast from type 'double' to type 'char*'
Can anyone help?
Thanks folks!!
--
====================== E-Communications Canada =====================
Jorge Escalante - Software Development Coordinator.
E-Mail Policy http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a point of humiliation of others.
* What does an elephant do when he gets a broken toe?
-He calls a toetruck
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads