| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 349 人关注过本帖
标题:C++程序异常求解
只看楼主 加入收藏
xiaoxiliushu
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-12-28
结帖率:0
收藏
已结贴  问题点数:20 回复次数:3 
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
wangdayong99
Rank: 2
等 级:论坛游民
帖 子:9
专家分:97
注 册:2013-12-24
收藏
得分:7 
把return 0语句去掉
2013-12-29 18:41
rjsp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:528
帖 子:9025
专家分:54030
注 册:2011-1-18
收藏
得分:7 
C++/CLI 和 C++ 毫无关系,你最好到.net论坛去问
2013-12-30 08:33
IceSource
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:37
专家分:139
注 册:2013-12-3
收藏
得分:7 
你试一下Ctrl+F5运行
2013-12-30 08:41
快速回复:C++程序异常求解
数据加载中...
 
   



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

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