check age in seconds in c++

i need to calculate my age in seconds ..how could i design the code

Page 1 of 1

1 Replies - 1839 Views - Last Post: 07 March 2010 - 12:00 AM Rate Topic: -----

#1 ayush_a5b  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 06-March 10

check age in seconds in c++

Posted 06 March 2010 - 11:53 PM

help me to design the code to calculate age in seconds ..
help me out with the logic
Is This A Good Question/Topic? 0
  • +

Replies To: check age in seconds in c++

#2 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: check age in seconds in c++

Posted 07 March 2010 - 12:00 AM

Use the time function to get the number of seconds since 1970. Divide by number of seconds in a minute, number of minutes in an hour, number of hours in a day etc.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1