Question: oid display _ days ( struct day * day _ one, struct day * current _ day ) { struct day * current = day

oid display_days(struct day *day_one, struct day *current_day){
struct day *current = day_one;
// Iterate through all days
while (current != NULL){
// Check if the current day is the current day
int is_current =(current == current_day);
// Calculate the total income for the current day
double income = total_income(current);
// Calculate the most popular signature crepe for the current day
char most_pop = calculate_most_popular_signature(current->orders);
// Print the information for the current day
print_single_day(is_current, current->date, most_pop, income);
// Move to the next day if it exists
if (current->next != NULL){
print_arrow();
current = current->next;
} else {
break; // Exit the loop if current->next is NULL
}
}
}
it keeps saying my current->next is uninitialised. I dont know what to do.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!