// 29_29-3.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>

using namespace std;

template <typename T1, typename T2> T1 nextData(T2 dt)
{
	return static_cast<T1>(dt + 1);
}

int _tmain(int argc, _TCHAR* argv[])
{
	cout << nextData<int>(66.55) << '\n';
	cout << nextData<double>(66.55) << '\n';
	cout << nextData<char>(66.55);

	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

