⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 soln2_6.cpp

📁 Wrox.Ivor.Hortons.Beginning.Visual.C.Plus.Plus.2008 With sourcecode
💻 CPP
字号:
// Soln2_6.cpp : main project file.

#include "stdafx.h"

using namespace System;
// Define the enumeration at global scope
enum class Month{January,   February, March,    April,
                 May,       June,     July,     August,
                 September, October,  November, December};

int main(array<System::String ^> ^args)
{
  Month month = Month::January;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::February;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::March;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::April;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::May;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::June;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::July;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::August;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::September;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::October;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::November;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  month = Month::December;
  Console::WriteLine(L"Month is {0} and the value is {1} ", month, safe_cast<int>(month));
  return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -