主题:如何让.net控制台应用程序暂停
各位高手,请教:我的程序启动时,总是一闪就结束了,我都看不清楚结果,为什么呢?
下面是源码:
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
__value enum WeekDay
{
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
};
int _tmain()
{
WeekDay w=Monday;
Console::Write("value of w is ");
Console::WriteLine (w);
switch(w)
{
case Monday:
Console::WriteLine("it's a monday!");
break;
case Tuesday:
Console::WriteLine("it's a tuesday!");
break;
case Wednesday:
Console::WriteLine("it's a wednesday!");
break;
case Thursday:
Console::WriteLine("it's a thursday!");
break;
default:
Console::WriteLine("it's a monday!");
break;
}
// TODO: 请用您自己的代码替换下面的示例代码。
/*Console::WriteLine(S"Hello World");
return 0;*/
}
下面是源码:
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
__value enum WeekDay
{
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
};
int _tmain()
{
WeekDay w=Monday;
Console::Write("value of w is ");
Console::WriteLine (w);
switch(w)
{
case Monday:
Console::WriteLine("it's a monday!");
break;
case Tuesday:
Console::WriteLine("it's a tuesday!");
break;
case Wednesday:
Console::WriteLine("it's a wednesday!");
break;
case Thursday:
Console::WriteLine("it's a thursday!");
break;
default:
Console::WriteLine("it's a monday!");
break;
}
// TODO: 请用您自己的代码替换下面的示例代码。
/*Console::WriteLine(S"Hello World");
return 0;*/
}