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
|