Slide 2.4: Opening and closing files (cont.) Slide 2.6: Reading and displaying file contents (cont.) Home |
test1.txt
and write them to the terminal screen.
void setf( fmtflags mask );
or
void unsetf( fmtflags mask );
mask
.
Some of the flags are as follows:
Flag | Effect IF Set |
---|---|
ios_base::basefield |
A constant that can be used as masks: dec | oct | hex |
ios_base::boolalpha |
Input/output bool objects as alphabetic names (true, false) |
ios_base::hex |
Input/output integer is in hexadecimal base format |
ios_base::showpoint |
Output floating-point values including always the decimal point |
ios_base::showbase |
Output integer values preceded by the numeric base |
ios_base::skipws |
Skip leading whitespaces on certain input operations. |
ios_base::uppercase |
Output uppercase letters replacing certain lowercase letters |