// 25_25-3.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>

using namespace std;

class Csmp2 {
private:
	int x, y;
public:
	Csmp2(int n1, int n2);	// 引数がふたつのコンストラクタ宣言
	void disp() {
		cout << "x=" << x << " y=" << y << '\n';
	}
};

Csmp2::Csmp2(int n1, int n2)
{
	x = n1;
	y = n2;
}

int _tmain(int argc, _TCHAR* argv[])
{
	Csmp2 d1(100, 200);
	Csmp2 d2 = Csmp2(300, 400);

	d1.disp();
	d2.disp();

	d2 = Csmp2(500, 600);
	d2.disp();

	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

