473,378 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

print the current time on the screen.

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;

}
Apr 15 '07 #1
1 1249

"Allen Maki" <al*******@sbcglobal.netwrote in message
news:K3***************@newssvr17.news.prodigy.net. ..
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?
<snip>

OK, here's the same thing in the context of a C++/CLI main() method.

int main(array<System::String ^^args)

{
DateTime current = DateTime::Now;

Console::WriteLine(current);

return 0;

}
Apr 15 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Manfred Schwab | last post by:
Recording messages and print statements in a textfile during program execution. Is there a similar command to redirect errormessages or print statements into a standart asciifile during...
3
by: Zlatko Matić | last post by:
Hello. I tried to print the current situation on the form/subform/subform...but it seems that Access prints all the records on all the subforms. I would like to print just the image (something...
5
by: Allen Maki | last post by:
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
2
by: Ste | last post by:
Hi, I would like to print the current showing record from the Form screen but don't know where to start. Here are what I have: I can print any records from report built from query that has...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.