标题:C++程序异常求解
取消只看楼主
xiaoxiliushu
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-12-28
结帖率:0
已结贴  问题点数:20 回复次数:0 
C++程序异常求解
//201.cpp

#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"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::February;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::March;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::April;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::May;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::June;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::July;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::August;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::September;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::October;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::November;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 month = Month::December;
 Console::WriteLine(L"Monthis {0} and the value is {1} ", month, safe_cast<int>(month));
 return 0;
}
这个程序运行闪一下就退出了,我在后面加上system("PAUSE"),也不行,不识别system,不知道怎么办?
搜索更多相关主题的帖子: include 
2013-12-28 22:54



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-425838-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.113933 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved