TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JEAN-POL LANDRAIN
from: JERRY COFFIN
date: 1997-04-07 09:44:00
subject: C++ Formatted Output

On (01 Apr 97) Jean-Pol Landrain wrote to Jerry Coffin...
 JL> Salut Jerry,
Hello,
 JC> [ wanting to write a manipulator with two parameters ]
[ example code elided ]
 JL> Great !!! That's exactly what I was looking for.
 JL> Now, how can I do that with templates ?
Basically you just eliminate any `IOMANIPdeclare's, and change
`OMANIP(TYPE)' to `omanip' (likewise with IMANIP, IOMANIP, etc.)
For example, in the code I posted previously, delete the IOMANIPdeclare
line, and replace `fill_lines' with the following:
omanip fill_lines(char ch, int lines = 1, int width = 79)
{
    line_filler p(ch, width, lines);
    return omanip (line_filler::do_fill, p);
}
And it should work with, say, the latest version of BC++. (It did for me
anyway...)
    Later,
    Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.