Hi everyone!
I've always been curious about programming so I'm taking a class as a hobby but seeing as I'm a total beginner I'm pretty lost.
I have a tuple where some of the variables are a dates,:
insert
Code:
typedef struct {
tDate packingDate;
tDate bestBeforeDate;
} tProduct;
And then in a different c file I've been given this
insert
Code:
void dateInit(tDate *date, int day, int month, int year){
date->day = day;
date->month = month;
date->year = year;
}
And a bool validateDate(tDate d) where it checks that the dates are correct. I need to validate the dates but I don't understand what's the use of dateInit. Also, if these functions are in a different file, how should I use them inside my function?
Do you know any book of webpage for beginners that could be helpful? I'm seeing I really need it and I'd be really grateful! Thank you!