lundi 24 juin 2019

"Cannot convert from 'std::ofstream {aka std::basic_ofstream

I've written this code

ofstream f(<namefile>);

f.write(reinterpret_cast<const char *>(&ins.num_dip),
    sizeof(ins.num_dip));

f.write(reinterpret_cast<const char *>(ins.dip),
    ins.num_dip * sizeof(char));

return f;

but I don't understand where I'm wrong, can you help?

Aucun commentaire:

Enregistrer un commentaire