ofstream::setmode

int setmode( int nMode = filebuf::text );

Return Value

The previous mode; –1 if the parameter is invalid, the file is not open, or the mode cannot be changed.

Parameter

nMode

An integer that must be one of the following static filebuf constants:

Remarks

This function sets the binary/text mode of the stream’s filebuf object. It may be called only after the file is opened.

ofstream OverviewOutput Stream Classes

See Also   ios binary manipulator, ios text manipulator