C++相談室 part72
■ このスレッドは過去ログ倉庫に格納されています
0041デフォルトの名無しさん
2009/09/03(木) 21:34:11大分前に書いたコードから抜粋してきたけどこれでそれなりに動かない?
#include <iostream>
#include <sstream>
#include <windows.h>
class odstringbuf : public std::stringbuf
{
protected:
virtual int sync(void) {
OutputDebugString(str().c_str());
str("");
return 0;
}
};
int main(void) {
odstringbuf odsbuf;
std::ostream ods(&odsbuf);
ods << "debug log" << std::endl;
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています