Rabu, 30 November 2016

What are the manipulators in C++

Manipulators are helper functions which can be used for formatting input and output data. The ios class and iomanip.h header file has several pre-defined manipulators.   Below table lists out several pre-defined manipulators. The manipulators hex, oct, dec, ws, endl, and flush are defined in iostream.h. The manipulators setbase(), width(), fill(), etc., that require an argument are defined in iomanip.h. Sometimes, to satisfy custom requirements, we have to create our own manipulator. Such manipulators which are created by the programmer or user are known as user-defined manipulators.   Syntax for creating a user-defined manipulator is as follows:   ostream &

The post What are the manipulators in C++ appeared first on Coding Security.


What are the manipulators in C++
read more

Tidak ada komentar:

Posting Komentar