Modula2's godawful IO.
BRUCE SZABLAK
bds at lzaz.ATT.COM
Wed Apr 13 04:21:41 AEST 1988
In article <547 at m10ux.UUCP>, rgr at m10ux.UUCP (Duke Robillard) writes:
> In article <96 at lzaz.ATT.COM> bds at lzaz.ATT.COM (BRUCE SZABLAK) writes:
> >I like C++'s overloading of the << and >> operator's even better ...
>
> Yeah, but that doesn't help me print out an error message, two strings,
> and an integer return code. I don't want to have to write a method
> for every print....
>
In C++:
#include <stream.h>
Then:
...
cout << "error message " << string1 << " " << string2 << " " << rc;
...
The header file defines printing for the ususal types.
More information about the Comp.lang.c
mailing list