// 21_21-17.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>

using namespace std;

ostream &general(ostream &ost)
{
	ost.setf((ios_base::fmtflags)0, ios_base::floatfield);
	return ost;
}

ostream &hexupr(ostream &ost)
{
	ost << hex;
	ost.setf(ios_base::uppercase);
	return ost;
}

ostream &orgset(ostream &ost)
{
	ost.setf((ios_base::fmtflags)0, ios_base::floatfield);
	ost.setf(ios_base::dec, ios_base::basefield);
	ost.unsetf(ios_base::uppercase);
	return ost;
}

ostream & beep(ostream& ost)
{
	ost << '\a';
	return ost;
}

int _tmain(int argc, _TCHAR* argv[])
{
	int idt = 12345678;
	double ddt = 12.3456;

	cout << scientific << ddt << '\n';
	cout << general << ddt << '\n';
	cout << hex << idt << '\n';
	cout << hexupr << idt << '\n';
	cout << orgset << idt << '\n';
	cout << beep;

	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

