📄 io07.c
字号:
#include "fail.h"
#include <iostream.h>
#include <strstrea.h>
static ostrstream sout;
struct C {
ostrstream &r;
C( ostrstream &r ) : r(r) {
}
};
template <class T>
C& operator <<( C& d, const T& x ) {
d.r << x;
return d;
}
int main()
{
C c(sout);
#if __WATCOM_REVISION__ >= 8
// really checks if "reference to pointer to function" works properly
c << "@1234@" << ends;
char *p = sout.str();
if( strcmp( p, "@1234@" ) != 0 ) fail(__LINE__);
#endif
_PASS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -