Re: write
Art Cummings wrote:
>
>>
>> In that case, the line should not compile. There would be no write()
>> member
>> function.
>>
>>
> Actually it does compile and it writes to disk. [snip]
a) Please post enough context. Keep in mind that news group postings
propagate independently through the net. As a consequence, a reply might
appear on a server before the question. In that case, the thread history
will not be available so you should not rely on that.
b) Here is the line in question:
student.write(reinterpret_cast<char *>(&studentInfo),sizeof(studentInfo));
If that line compiles, it just proves that student is not an array. Could it
be that student is some kind of stream?
Anyway, if you still have a problem with your code, please follow the
recommendations in FAQ clause [5.8].
Best
Kai-Uwe Bux
|