I'm having trouble creating the pause manipulator for the code below. "m" is an object that prints the given numbers in morsea code. This works for me, but I don't know how to make a manipulator for it. Can you help me with this problem?
long x = 0x2A6B5B5A;
double y = 8.23786789;
m<< x << pause << y ;
It is not quite clear what your code is supposed to do. However, all you need is this:
Put the code that does whatever you like to happen in place of
//put code here, then use it like this:If
min your example is not astd::ostreamthen you just need to adjust above overload for<<accordingly.PS: Strictly speaking the above is not an io manipulator. io manipulators are typically implemented as functions that take the
ostreamas parameter andstd::ostreamhas an overload of<<for such functions. However, that distinction is probably not important in your case.