Manipulating Manipulators - C++ File Stream

C++ examples for File Stream:cout

Introduction

The most common manipulators and their corresponding meanings are shown in the following table.

ManipulatorMember Function Description
decsetf(dec)Sets radix to 10
hexsetf(hex)Sets radix to 16
octsetf(oct)Sets radix to 8
setfill(c) fill(c) Sets the fill character to c
setprecision(n)precision(n) Sets display precision to n
setw(n)width(n) Sets width of field to n characters*

Related Tutorials