sorting days of the week

This is a discussion on sorting days of the week within the C Programming forums, part of the General Programming Boards category; Is there any routine in C that can sort the days of the week the way they should be (like ...

  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,796
    >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, 02:51 AM
  3. Force end
    By Redattack34 in forum C++ Programming
    Replies: 9
    Last Post: 09-07-2005, 12:16 AM
  4. The day of the week America was discovered
    By Gustaff in forum C Programming
    Replies: 3
    Last Post: 08-12-2005, 10:47 AM
  5. while, sentinel, if, switch
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 11-11-2001, 11:50 PM

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