HighTechTalks DotNet Forums  

print the current time on the screen

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss print the current time on the screen in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Allen Maki
 
Posts: n/a

Default print the current time on the screen - 04-15-2007 , 05:07 PM






Hi everybody,



I need help.



I want to print the current time on the screen. After research I managed to
run the codes below in regular C++. But I could not make it to run in .NET
Framework environment. Can anybody tell me how to make these codes to work
in .NET Framework or show me an alternative codes?



/*

the author said that you have to turn on debug multi-threading to make this
program works

*/



#include <afx.h>

#include <iostream>

using namespace std;



int main()

{

CTime now = CTime::GetCurrentTime();

CString str = now.Format(" %H:%M:%S - ");

cout << str << endl;



return 0;

}



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.