123
float f; f1 = fopen(fn.c_str(),"wb"); fwrite(&f, sizeof(float),1,f1);
float f; ofstream out_file(filename, ios_base::binary); out_file << f;
1234
float f=3.14587; ofstream fl; fl.open(fn.c_str(), ios::binary); fl.write(reinterpret_cast<char*>(&f),sizeof(float));