Thread: sorting days of the week

  1. #1
    brodacz
    Guest

    Question sorting days of the week

    Is there any routine in C that can sort the days of the week the way they should be (like Sun Mon Tue Wed ect.). If there isn't one anyone have any ideas how i could do that. Thanx in advance

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Is there any routine in C that can sort the days of the week the way they should be
    Could you be more specific as to what this is to be used for?

    -Prelude
    My best code is written with the delete key.

  3. #3
    brodacz
    Guest
    Well the program reads a file with projects and hours spent on each project each day. The data looks something like this

    Sunday Some_project_Name Project_Fund hours_spent some_text

    from those data I need to generate a report that will be printed in a form project_name (sorted alphabetically) project_fund (also sorted alphabetically) and the hours spent each day on the project all in one line, something like this:

    Project Name Fund Name Sunday Monday Tuesday ect.
    Brodacz Holiday_Pay
    . The file that the program needs to read is not sorted.

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    1
    Never mind I found a solution to my problem.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 47
    Last Post: 01-04-2008, 05:24 AM
  2. Generate Random Numbers and Assign to Days of Week
    By mms in forum C++ Programming
    Replies: 10
    Last Post: 05-04-2006, 01:51 AM
  3. Force end
    By Redattack34 in forum C++ Programming
    Replies: 9
    Last Post: 09-06-2005, 11:16 PM
  4. The day of the week America was discovered
    By Gustaff in forum C Programming
    Replies: 3
    Last Post: 08-12-2005, 09:47 AM
  5. while, sentinel, if, switch
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 11-11-2001, 11:50 PM