Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 105,772 C++ Programmers for FREE! Ask your question and get quick answers from experts. There are 1,479 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



C++ timer function

 
Reply to this topicStart new topic

C++ timer function

c--
post 20 Jul, 2008 - 12:45 AM
Post #1


New D.I.C Head

*
Joined: 26 Jan, 2008
Posts: 27

Greetings!

I need help with a console application I'm developing in C++...
I need to show a message in the program, however, that message should dissappear after some seconds by clearing the screen, maybe with the function system("cls")... My question is, is there any helpful function I can use as a timer to do that...?
User is offlineProfile CardPM

Go to the top of the page


gabehabe
post 20 Jul, 2008 - 03:30 AM
Post #2


T3H R0XX0R!

Group Icon
Joined: 6 Feb, 2008
Posts: 2,054



Thanked 40 times

Dream Kudos: 1425

Expert In: C, C++

My Contributions


Click that "my contributions" link under my name.

You want the following two:
"A better timer" -> a timer class (C++)
"Redefining clrscr()" -> a better solution for clearing the screen

Hope they help smile.gif
User is online!Profile CardPM

Go to the top of the page

c--
post 20 Jul, 2008 - 08:19 AM
Post #3


New D.I.C Head

*
Joined: 26 Jan, 2008
Posts: 27

QUOTE(c-- @ 20 Jul, 2008 - 12:45 AM) *

Greetings!

I need help with a console application I'm developing in C++...
I need to show a message in the program, however, that message should dissappear after some seconds by clearing the screen, maybe with the function system("cls")... My question is, is there any helpful function I can use as a timer to do that...?


Ok I'l check it out! Thank you. biggrin.gif
User is offlineProfile CardPM

Go to the top of the page

UG Cyber
post 27 Jul, 2008 - 08:50 AM
Post #4


New D.I.C Head

*
Joined: 24 Jul, 2008
Posts: 32

QUOTE(c-- @ 20 Jul, 2008 - 08:19 AM) *

QUOTE(c-- @ 20 Jul, 2008 - 12:45 AM) *

Greetings!

I need help with a console application I'm developing in C++...
I need to show a message in the program, however, that message should dissappear after some seconds by clearing the screen, maybe with the function system("cls")... My question is, is there any helpful function I can use as a timer to do that...?


Ok I'l check it out! Thank you. biggrin.gif


actually you could use my favorite.
Sleep(1000) would be one sec. I believe its in iostream but i could be wrong, havent used it in a while blink.gif
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 8/21/08 03:31PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month