Thread: How to create counter

  1. #1
    Registered User
    Join Date
    Dec 2014
    Posts
    25

    How to create counter

    Need to create time (in hours) counter. For example count 20 hours and save intermediate values to file, so will be enough to check time each hour (not each second). Is it possible?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > Is it possible?
    Yes.
    How To Ask Questions The Smart Way
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Dec 2014
    Posts
    25
    Quote Originally Posted by Salem View Post
    > Is it possible?
    Yes.
    You are bad person, please don't reply me anymore.

  4. #4
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Quote Originally Posted by atztek View Post
    You are bad person, please don't reply me anymore.
    He answered your question, precisely and concisely. Is that bad? Did you want him to elaborate? There's no point in going on a limb only to find out you meant something else. Knowing how to ask questions can also help you in finding the answer by yourself. If English isn't your first language and you don't have enough experience with it, please acquire such experience before trying to ask questions in an english forum.
    Devoted my life to programming...

  5. #5
    Registered User
    Join Date
    Dec 2014
    Posts
    25
    Quote Originally Posted by GReaper View Post
    ...
    Discussion went to wrong way because of this ugly person.
    He achieved what he wanted.

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    You should read the article that Salem linked to concerning how to ask questions the smart way. You don't seem to have made any attempt to solve this yourself: "Describe the research you did to try and understand the problem before you asked the question."
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Registered User
    Join Date
    Dec 2014
    Posts
    25
    Since this thread will not lead anywhere it can be considered as closed.

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Works for me.
    Next time, post something we can actually use.

    Not a one-sentence vague description followed by "is it possible?" or "can you help me?".
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Counter
    By jackirl in forum C++ Programming
    Replies: 5
    Last Post: 11-27-2011, 12:01 PM
  2. create and populate create bidimensional array
    By darkducke in forum C Programming
    Replies: 0
    Last Post: 12-03-2010, 07:06 AM
  3. Odd/Even counter.
    By fyoung91 in forum C++ Programming
    Replies: 3
    Last Post: 08-11-2010, 12:02 PM
  4. Page File counter and Private Bytes Counter
    By George2 in forum Tech Board
    Replies: 0
    Last Post: 01-31-2008, 03:17 AM
  5. Help!Counter...
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 05-25-2002, 01:14 AM

Tags for this Thread