The code is given below is not allowed to compile because of struct's order. song_node struct has playlist variable and playlist struct has song_node variable.
This code is runned on Visual Studio or gcc compile.
struct song_node {
song* data;
song_node* next;
song_node* prev;
playlist* parent;
};
struct playlist {
int songnumber;
char* name = new char[LNAME_LENGTH];
song_node* head;
playlist* next;
playlist* prev;
};
I am new on Xcode. What is the problem in this code?