|
-
Jun 11th, 2000, 06:17 AM
#1
Thread Starter
Dazed Member
// implementation file for odometer.h
Ccar::void reading(cur_speed) //distance travled will be in miles and feet
{
long dis_travled(0);
const mile(5280); // one mile = 5280 feet
dis_travled = cur_speed * 1.46;
return dis_travled
}
//this is is just the body of my function
1.46
// MPH = ---------
seconds
i got this formula off of a web site
to convert MPH to feet per sec
but how can i obtain the system seconds and incorporate
that funcion into my function?
thanxxxxxx guys {and girls} =C)
-
Jun 12th, 2000, 02:56 AM
#2
look into time.h and the clock() function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|