Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Borlan c++ ttime

Posted on 2000-02-22
3
Medium Priority
?
392 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 80 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
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…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

610 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