Einzelnen Beitrag anzeigen

Niko

Registriert seit: 23. Jun 2003
416 Beiträge
 
Delphi 2006 Professional
 
#2

Re: [C++] Raw Bytes von float

  Alt 21. Dez 2009, 14:54
Hi,

das geht bei einem float genauso wie bei einem int. Eventuell verstehe ich auch nicht richtig, was du erreichen willst.

Code:
float f = 4711.42;
char *rawfloat = reinterpret_cast<char*>(&f);
"Electricity is actually made up of extremely tiny particles called electrons, that you cannot see with the naked eye unless you have been drinking." (Dave Barry)
  Mit Zitat antworten Zitat