// 7_7-2-1.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>

using namespace std;

namespace spc1 {	// spc1名前空間
	int dt;
	void disp() {
		cout << "spc1_dt=" << dt << '\n';
	}
}

namespace spc2 {	// spc2名前空間
	int dt;
	void disp() {
		cout << "spc2_dt=" << dt << '\n';
	}
}

int dt;	// グローバル変数
void disp() {
	cout << "global_dt=" << dt << '\n';
}

int _tmain(int argc, _TCHAR* argv[])
{
	/* 名前空間の記述 */
	spc1::dt = 100;
	spc1::disp();
	spc2::dt = 200;
	spc2::disp();
	dt = 300;
	disp();

	/* 名前空間名の統合 */

	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

