Solved

Borlan c++ ttime

Posted on 2000-02-22
3
384 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 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

688 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