// 30_30-10.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>
#include <stack>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	int i;
	stack<int> stk;

	cout << "-----3個のデータをpushする\n";
	for (i = 1; i <= 3; i++) {
		stk.push(i * 100);
		cout << i * 100 << "をpushした\n";
	}

	cout << "-----末尾から取り出す\n";
	while (!stk.empty()) {
		cout << "top=" << stk.top() << " size=" << stk.size() << '\n';
		stk.pop();
	}

	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

