#include <blindfold/ByteSink.h> #include <iostream.h> #include <string.h> char buf[256]; class MyByteSink : public ByteSink { public: virtual void write(const void* data, size_t numBytes) { memcpy(buf, data, numBytes); } }; int main() { MyByteSink* x = new MyByteSink(); x->write("Hello", 6); delete x; cout << "Hello? " << buf << endl; int same = (!memcmp("Hello", buf, 5)); return same ? 0 : 1; }