Discussion: write
Afficher un message
Vieux 07/12/2007, 10h46   #2
Kai-Uwe Bux
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: write

Art Cummings wrote:

> does the write function have a return type?


The write function from basic_ostream returns a basic_ostream&.


> I've got a write statement
> that isn't writing and I wanted to see if there is a way to do error
> checking.


The returned reference refers to the stream and you could check the flags.


> student.write(reinterpret_cast<char *>(&studentInfo),sizeof(studentInfo));


"student" is a rather peculiar name for a stream.



Best

Kai-Uwe Bux



  Réponse avec citation
 
Page generated in 0,04242 seconds with 9 queries