Thread: Appointment Manager

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    6

    Appointment Manager

    Doing an appointment manager in C++ under Ubuntu using command line interface.

    Will store all appts inside a standard db.txt file with one entry per line.


    User will enter ./add 5 March 2009 Test One

    Just wonder if C++ has native function that can let me do the sorting of month in english, instead of converting it into March=03.

    Also what approach should I take to sort the entries into date order whenever I addd a new appointment.


    i.e. the text file should contain appts stored in date order, one appt per line.

    5 March 2009 Test One
    5 May 2009 Test Two
    15 June 2010 Project One.

  2. #2
    Registered User
    Join Date
    Mar 2007
    Posts
    416
    Just wonder if C++ has native function that can let me do the sorting of month in english, instead of converting it into March=03.
    Whats wrong with telling it the month in numbers? There's only 12 so it shouldn't be a big deal to convert the month to its corresponding number.

    Also what approach should I take to sort the entries into date order whenever I addd a new appointment.
    Maybe sort by month first, then by day. And if you add in time you could always do by hour/minute later. Start with the biggest time spand first, and work your way smaller.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    If you store the date and time in a standard format, then you'll have a much easier time of it when sorting, and a much easier time of it when it comes to supporting different users in different locales.
    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. Replies: 0
    Last Post: 07-30-2009, 07:14 AM
  2. Sorting out a resource manager
    By psychopath in forum Game Programming
    Replies: 1
    Last Post: 11-10-2008, 07:12 PM
  3. Task Manager technic
    By NoFearXD in forum Windows Programming
    Replies: 10
    Last Post: 05-26-2007, 10:09 AM
  4. Templated Generic Resource Manager, WIP..
    By Shamino in forum C++ Programming
    Replies: 13
    Last Post: 02-19-2006, 06:29 PM
  5. Graphical interface in C ?
    By Golgot in forum C Programming
    Replies: 5
    Last Post: 11-18-2001, 04:10 PM