First program question
1 2 3 4 5 6 7 8 9 10 11 12 13
|
int main(array<System::String ^> ^args)
{
SYSTEMTIME Time;
GetLocalTime(&Time);
if (Time.wDay > 0)
{
printf("Hello World");
printf("%d", Time.wMonth);
}
return 0;
}
| |
my code works fine it compiles in all
my only question is how come when i run the exe file it quickly closes after showing :S
add something like this right before your
return 0;
.
1 2
|
std::cout << "Press ENTER to continue...";
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' )
| |
It all depends what IDE you use some seem to be to stupid to realize that the command console should remain open when running from the IDE.
system("pause");
Before return 0;
Topic archived. No new replies allowed.