Get system time
-
How can i get the system time and display it?
-
How can i get the system time and display it?
shamsteady wrote:
How can i get the system time...
Use GetSystemTime(), or
time()
.shamsteady wrote:
...and display it?
Use
printf()
, orcout
.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
shamsteady wrote:
How can i get the system time...
Use GetSystemTime(), or
time()
.shamsteady wrote:
...and display it?
Use
printf()
, orcout
.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
It said GetSystemTime() is undeclared. Am i missing something?
-
It said GetSystemTime() is undeclared. Am i missing something?
shamsteady wrote:
Am i missing something?
Yes, the inclusion of a header file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
How can i get the system time and display it?
-
It said GetSystemTime() is undeclared. Am i missing something?
shamsteady wrote:
Yes, the inclusion of a header file.
shamsteady wrote:
t said GetSystaremTime() is undeclared. Am i missing something?
which compiler are you using@!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
-
How can i get the system time and display it?
See
SYSTEMTIME m_SysTime;
char DisplayTime[255];
::GetSystemTime(&m_SysTime);
sprintf(DisplayTime,"%d/%d/%d...%d::%d::%d::%d",
m_SysTime.wMonth,m_SysTime.wDay,
m_SysTime.wYear,m_SysTime.wHour,
m_SysTime.wMinute,m_SysTime.wSecond,m_SysTime.wMilliseconds);
WhiteSky