I have the following code:
#define MAX_VIDEOS 100
typedef struct video_t {
int likes;
int dislikes;
char* title;
user_t* uploader;
} video_t;
typedef struct user_t {
char* username;
char* password;
video_t videos[MAX_VIDEOS];
} user_t;
I want to use user_t
in video_t
and vice versa.
In every case, gcc
just says "unknown type name"
:
youtube.c:9:5: error: unknown type name ‘user_t’
user_t* uploader; ^
which is normal, but I can't think of a way to solve this problem.