Results 1 to 2 of 2

Thread: Seconds() function????

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Question

    // 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)

  2. #2
    Guest
    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
  •  



Click Here to Expand Forum to Full Width