Solved

Borlan c++ ttime

Posted on 2000-02-22
3
375 Views
Last Modified: 2012-06-22
does anybody know how to use the ttime class and his functions?
an example would be nice.
thankx
0
Comment
Question by:klecki_2000
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 20 total points
ID: 2546613
Hi.
Usually , i reply throuh EE.
1. In you 1-st Q you must use only DOS project:
   not EasyWin,Console! Function sound() works
   only in Dos. In Windows use sndPlaySound or PlaySound
   Api.
2. TTime "suffers" form Y2K. It works before 2000 and
   don't works after! I usually use good old gettime.
   In next example gettime works(allways(, TTime: not!

void main()
{
  struct time tm;
  TTime zman;
  gettime(&tm);
  HourTy Hour = zman.Hour();
  SecondTy sec = zman.Second();
  MinuteTy Min = zman.Minute();
  printf("TTime   = %d:%d:%d\n",Hour,Min,sec);
  printf("gettime = %d:%d:%d\n",tm.ti_hour,
            tm.ti_min,tm.ti_sec);
  getch();
}
3. And my Q: i understand, that you know my EMail
  from Ediot Aharonot. Can you write exectly date and page
  of an article?
Alex
0
 

Author Comment

by:klecki_2000
ID: 2550199
Adjusted points to 22
0
 

Author Comment

by:klecki_2000
ID: 2550200
good answer and most important an excellent example.
Thank you Alex.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maze travler 6 62
object modeling - load and save functions 5 62
How to convert MFC::CString to UTF8 wchar_t* 10 292
No module found pypyodbc, 3 33
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question