La write si aspetta un puntatore a char, non un char e basta (serve per poter scrivere a blocchi); a te basta semplicemente scrivere:
o più semplicemente,codice:file.write((char*)&car, 1);
codice:file.put(car);
La write si aspetta un puntatore a char, non un char e basta (serve per poter scrivere a blocchi); a te basta semplicemente scrivere:
o più semplicemente,codice:file.write((char*)&car, 1);
codice:file.put(car);
Amaro C++, il gusto pieno dell'undefined behavior.