Thread: function prototype

  1. #1
    Registered User
    Join Date
    Jun 2007

    function prototype

    there are any company name, its opening hours and days, for example,
    ABC Corp. - Monday-Friday 10.00-18.00(or 10am-6pm)
    Saturday 10am-3pm
    how can i calculate in c the whole working hours of this company, if i`ve got function prototype int hours(char*)?
    the result should be: ABC Corp. - 5(weekdays)*8(hours)+5(hours at weekends) = 45 hours
    thanks for help

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Parse it and return the hours, no one is here to do your homework for you.
    Research, strtok, strstr and alike. Or even just sscanf()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 08:28 AM
  2. Troubleshooting Input Function
    By SiliconHobo in forum C Programming
    Replies: 14
    Last Post: 12-05-2007, 07:18 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. call to function without prototype
    By lgbeeb in forum C Programming
    Replies: 2
    Last Post: 03-25-2003, 12:20 PM
  5. Replies: 5
    Last Post: 02-08-2003, 07:42 PM