Thread: world clock

  1. #1
    Registered User nevermind's Avatar
    Join Date
    Oct 2002

    world clock

    I had posted a question regarding a clock program earlier today 23-10-2002 (Please Help with progam)

    Following this I want to create a world clock with five world city times. I know I will use inheritance to create a base class and then derive the rest of the clocks from this. Now the important factor is the dispalying of the time. I am stuck in the part which is polymorphism (I am right I hope).

    //my basic pseudo code

    class clock{
    virtual void show_time();

    class NewYorkClock : clock{
    void show_time();


    and so on ... for the other cities

    I need help to display the times for the 5 cities using the base class' show_time() function. And I was hoping anyone could provide me with perhaps a link or any assistance on how to achive this using polymorphism.

    Thanks again.

  2. #2
    julie lexx... btq's Avatar
    Join Date
    Jun 2002
    try this ...

    ...viewlexx - julie lexx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Outside influences on clock cycles? (clock_t)
    By rsgysel in forum C Programming
    Replies: 4
    Last Post: 01-08-2009, 06:15 PM
  2. clock program
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 03-30-2007, 10:12 PM
  3. Obfuscated Code Contest: The Results
    By Stack Overflow in forum Contests Board
    Replies: 29
    Last Post: 02-18-2005, 05:39 PM
  4. Converting from Screen to World Coordinates
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 05-11-2004, 12:51 PM
  5. Too much to ask ?
    By deflamol in forum C Programming
    Replies: 2
    Last Post: 05-06-2004, 04:30 PM