what is manipulator? in C++ define varios types of manipulator.............
+4
A:
Searching Google for "c++ manipulator" return this excellent page as the first result. Basically it's a function which if passed to a stream changes the stream's behaviour.
Max Shawabkeh
2010-01-23 04:43:24
More like a function which, if itself passed to a stream, changes the stream's behaviour. And if you pass the stream to the manipulator then you get the same result as inserting the manipulator into the stream. About the only thing you can't do is pass the result of the function to the stream, although the parameterized stream manipulators like `setw` confuse the issue further ;-)
Steve Jessop
2010-01-23 14:25:58
Right you are. I was thinking of parametrized manipulators. Fixed, thanks.
Max Shawabkeh
2010-01-23 16:14:06