// 23_23-1.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>
#include <sstream>

using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
	ostringstream ostr;
	int idt = 255;
	double ddt = 1234.56;

	cout << "-----出力ストリームに書き込む\n";
	ostr << "aaaa\n";
	ostr << "bbbb\n";
	ostr << idt << " " << hex << idt << '\n';
	ostr << ddt << " " << scientific << ddt << '\n';
	cout << ostr.str();

	cout << "-----クリアして再び書き込む\n";
	ostr.str("");
	ostr << dec << idt << " " << hex << idt << '\n';
	cout << ostr.str();

	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

