How do u control time in c++

This is a discussion on How do u control time in c++ within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by master5001 lmao! Well like any programmer I'm not afraid to toy with the rules to get what ...

  1. #31
    Registered User
    Join Date
    Dec 2004
    Location
    UK
    Posts
    109
    Quote Originally Posted by master5001
    lmao! Well like any programmer I'm not afraid to toy with the rules to get what I want.

    Example:
    Code:
    tm->setPersonalItem("computer,clothes,book on WWII German war strategies");
    Just hope you don't end up wearing the book and running your program on your socks.

  2. #32
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Code:
    struct House
    {
       Book germanWarTactics;
       std::set<ClothingItem> closet; //underwear, space suit
       Computer computer;
       unsigned char forgottenItems[4096]; //Memory buffer to hold any forgotten objects
    }my_mansion;
     
    completeHouse(&my_mansion, sizeof(my_mansion));
    tm->setPersonalItem(&my_mansion);
    Last edited by Hunter2; 12-16-2004 at 09:10 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  3. #33
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    while we're at it

    Code:
    while(1)
        my_bank_account++;
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  4. #34
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    You forgot to dereference it. I guess that'd work anyway though, if it eventually points to Bill Gates' account
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  5. #35
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    my_bank_account is an object that overloadeds operator++ which when called adds 1 to my_bank_account.balance which is of type unsigned NumericalValueLargeEnoughToStoreAllTheMoneyInTheWo rld.

    i guess i would have to change the while loop so it doesn't overflow
    Last edited by misplaced; 12-16-2004 at 10:19 PM.
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  6. #36
    Bob Dole for '08 B0bDole's Avatar
    Join Date
    Sep 2004
    Posts
    618
    I didn't read all the posts so I don't know if this was said, but it's freaking retarded design to make the user wait for nothing using sleep, really bad design. IMEO *educated
    Hmm

  7. #37
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    > I didn't read all the posts
    Excuse me sir but who do you think you are pushing this thread back on track? It had just recently really started to spin off topic (where were we, banking now?). That said, I do have to agree with that. If a program waits to give the user input, users like me think the program froze and start cursing at its developer.

    Which just reminded me, while back in time I will make people fear the phrase "void main(void)" and for Hammer how about "flush(stdin)" as well. Then in the decades to come when C is invented people would fear using them, since they think it means they are some sort of nazi or something.

    *compiles code*

    Hey wait... my compiler doesn't seem to have timetravel.h.... apparently for visual studio the TimeMachine class is defined in MSWorldDomination.h

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. last write time
    By pastitprogram in forum C++ Programming
    Replies: 2
    Last Post: 07-31-2008, 06:54 PM
  2. (Multiline) Edit Control Limit
    By P4R4N01D in forum Windows Programming
    Replies: 9
    Last Post: 05-17-2008, 11:56 AM
  3. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  4. Read and set\change system time
    By Hexxx in forum C++ Programming
    Replies: 9
    Last Post: 01-02-2006, 06:11 AM
  5. calculating user time and time elapsed
    By Neildadon in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2003, 05:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21