R
rwawryk
Hi,
Does anybody know how to implement parametrized stream operator (such as
setw, setfill)? I need to put into the stream variable of type char* without
terminating NULL. It would be great if I had the manipulator which allows to
determine maximum number of characters ( let's assume maxw( char* str, int
maxlen ) ).
example:
cout << maxw("Crocodile", 5 );
Croco
thanx in advance
ralfer
ps. prefer templates to macros...
Does anybody know how to implement parametrized stream operator (such as
setw, setfill)? I need to put into the stream variable of type char* without
terminating NULL. It would be great if I had the manipulator which allows to
determine maximum number of characters ( let's assume maxw( char* str, int
maxlen ) ).
example:
cout << maxw("Crocodile", 5 );
Croco
thanx in advance
ralfer
ps. prefer templates to macros...