// 13_13-14.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>

using namespace std;

void putdt(int dt, int mode = 'd');	// デフォルト値を指定する

int _tmain(int argc, _TCHAR* argv[])
{
	putdt(1000);
	putdt(1000, 'd');
	putdt(1000, 'h');


	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

void putdt(int dt, int mode)	// 数値を10進数か16進数で表示
{
	if (mode == 'd') {
		cout << dec << dt << '\n';
	}
	if (mode == 'h') {
		cout << hex << dt << dec << '\n';
	}
}