Write binary data, const definition and reinterpret_cast

I have a doubt with this.

I have the typical function to write data to a binary file.
( reinterpret_cast< char*> (&value); )

A function can be written so:
1: void My_function_write( const double & value)
2: void My_function_write( double & value)

Are going to be faster 1 than 2 ?
In case of you recommend to use 1, I have to do some const_cast before the reinterpret_cast from double to char. So the question is the same: in this case 1 has become slower than 2 ?

Any explanation ? Thanks.-
Why are you storing a char* as a double in the first place?
mmm.
You're right. I have seen the << operator ......
Thanks.
Topic archived. No new replies allowed.