标签:turn char include ons printf his markdown world out
#include <stdio.h>
class MyOut
{
public:
const MyOut& operator<<(int value) const
{
printf("%d", value);
return *this;
}
const MyOut& operator<<(char *value) const
{
printf("%s", value);
return *this;
}
};
MyOut out;
int main()
{
char str[] = "HelloWorld\n";
int a = 10;
out << str << a;
return 0;
}
标签:turn char include ons printf his markdown world out
原文地址:http://www.cnblogs.com/nosit/p/7846336.html