Login, logout time check.

I am writing a program that allows a user to login and logout. What I want to do is to keep track how long they were logged in for. I have read http://www.cplusplus.com/reference/clibrary/ctime/difftime/, but I don't know how to implement it into my program. Should I create a function or something?
What are you going to do with the information? Store it in a file? Show the user when they log out? Something else?
From what I can tell you're doing (for future reference we prefer as much detail as you can give us without voiding any contracts you may be bound to) the answer is that "difftime" <i>is</i> a function, it returns a value in seconds that you may want to convert to minutes or do what ever with. How do you want to display the data?
Topic archived. No new replies allowed.