C two functions in one with casts
- by Favolas
I have two functions that do the exact same thing but in two different types of struct and this two types of struct are very similar.
Imagine I have this two structs.
typedef struct nodeOne{
Date *date;
struct nodeOne *next;
struct nodeOne *prev;
}NodeOne;
typedef struct nodeTwo{
Date *date;
struct nodeTwo *next;
struct…