// 25_25-4.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>

using namespace std;

class Csmp3 {
private:
	int x, y;
public:
	Csmp3();
	Csmp3(int n);
	Csmp3(int n1, int n2);
	void disp() {
		cout << "x=" << x << " y=" << y << '\n';
	}
};

Csmp3::Csmp3()
{
	x = 0;
	y = 0;
}

Csmp3::Csmp3(int n)
{
	x = n;
	y = 0;
}

Csmp3::Csmp3(int n1, int n2)
{
	x = n1;
	y = n2;
}

int _tmain(int argc, _TCHAR* argv[])
{
	Csmp3 d1;			// 引数が0個の初期化
	Csmp3 d2(100);		// 引数が1個の初期化
	Csmp3 d3 = 200;		// 引数が1個の初期化
	Csmp3 d4(300, 400);	// 引数が2個の初期化

	d1.disp();
	d2.disp();
	d3.disp();
	d4.disp();

	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

