D
D
Dima Sokolov2018-05-19 20:31:41
C++ / C#
Dima Sokolov, 2018-05-19 20:31:41

How to create a flow manipulator?

We need a simple example of a manipulator that outputs something to the stream, for example:
cout << text;

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Y
Yuri Mikhailuts, 2018-05-19
@JBMurloc

You can declare a manipulator like this:

ostream& tab(ostream & output)
{
    return output<< '\t';
}

Use like this: i.e. we just pass a function to the thread. This works because the basic_ostream class template has the following overload of the << operator:
Taken from here: https: //stackoverflow.com/questions/284188/how-do-the-stream-manip...

S
Sergey Melnikov, 2014-07-07
@WQP

codepen.io/anon/pen/yjpzm

A
Alexander N++, 2014-07-06
@sanchezzzhak

If you can't find it, then take part of the layout of the site.
F12 developer console.

N
Nikita Ryabin, 2014-07-06
@nick977

If I'm not mistaken, then you make another block, hide it with display:none and when you hover it is shown, the script seems to be needed for this effect.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question