Need help with some code. In a hurry!

I need some help with this assignment:

Need to write a function, with a prototype like:

int numberofday(char*);

Parameter should be the date as text in this form: d.mm.yyyy.
Today's date should be "8.06.2012".
The value of the function is the number of the day counting since the beginning of year.
Function has to give the right answer for every date from January 1 to December 31 and has to consider the leap year.

numberofday("1.01.2012") value is 1.
numberofday("8.06.2012") value is 160.
numberofday("31.12.2012") value is 366.

There is a file named Teater.txt which holds the theatre play schedule of this summer.
The data there is the weekday and date of month, time of start, name of the play, the place.
There is a "\t" between them in the text file. The data in the file is listed chronologically.

Need to write a program, which would have the data of the next time every play is taking place(starting from tomorrow) in output.
The program must ask today's date from the computer's clock.
Function "numberofday" should be used when comparing the dates, and it'll also calculate the number of days till the next play will take place.
In output there should only be the NEXT time the play will take place. (For each play).

Example:

Scapini kelmused
järgmine etendus 1 päeva pärast: 9.06.2012 19:00 Lavaauk

Kes kardab Virginia Woolfi?
järgmine etendus 3 päeva pärast: 11.06.2012 19:00 Kammersaal

((Translation:
Scalpini kelmused
next time in 1 day: 9.06.2012 19.00 Nameoftheatre

Kes kardab Virginia Woolfi?
next time in 3 days: 11.06.2012 19:00 Nameoftheatre


Can anyone please help me? I'm very new for this, but just got an assignment like this.
Oh no! I guess you better get to writing then.
Option 1:
Have you even tried? i.e. have you got some code that you have made but it's broken and you have a pretty good idea what's going wrong but quite can't get it.

Option 2:
Do you need a concept explained?

Option 3:
Need a couple of tips on where to start?

Option 4:
Want someone else to do it for you?

If you come under 1, 2 or 3 then ask away but i'm afraid your going to have to be more Specific with your question.

Whereas if you fall under 4 then your on the wrong site.

*RB*
Topic archived. No new replies allowed.