469,117 Members | 1,308 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,117 developers. It's quick & easy.

stopwatch program

hi! Please somebody help me

I'm really a newbie for C++

I have a task to create stopwatch program using C++

What should I write at C++??

please help me !!!
Oct 4 '07 #1
4 7592
sicarie
4,677 Expert Mod 4TB
hi! Please somebody help me

I'm really a newbie for C++

I have a task to create stopwatch program using C++

What should I write at C++??

please help me !!!
Sure we can help, but we need a bit more than "What should I write". I'm guessing you want to do this in seconds/minutes, etc... Have you looked at any of the time libraries (like time.h)?
Oct 4 '07 #2
Sure we can help, but we need a bit more than "What should I write". I'm guessing you want to do this in seconds/minutes, etc... Have you looked at any of the time libraries (like time.h)?
so, I should use time.h as header and ...
I don't know about the function of time.h
would tell me??
write the listing program of stopwatch??
I'm really need your help...
I'm so stupid at C++
thanks a lot before
Oct 7 '07 #3
sicarie
4,677 Expert Mod 4TB
Have you looked at the functions of the link I posted? If you drill down into them, you will find several things that will help you. I would recommend reading through those, and that should give you enough information to be able to create your algorithm for your program.
Oct 8 '07 #4
yeh you should really try to make and pseudocode algorith first then you can worry about the code.

if you would tell us exactly what u want would be easier for us to help.

here is a tip though using the time.h header
int totalTime=0;
time_t start,end;

time(&start);
.
. // do code here or loop till you want it to stop
.
time(&end);

totalTime = end-start;
totalTime will then contain the time in seconds between the start and end
Oct 8 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by luckyjameel | last post: by
3 posts views Thread by Jeff Jarrell | last post: by
1 post views Thread by =?Utf-8?B?UmFqYQ==?= | last post: by
4 posts views Thread by PlusNet | last post: by
reply views Thread by kerplunkwhoops | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.