I'm new to C++ and am coming from a C# background. I'm trying to practice with linked list.
The issue I am having is that I am trying to use the following linked list I created:
class Board {
typedef struct BoardList{
Board b_data;
Node *next;
}* boardPtr;
boardPtr head;
boardPtr current;
boardPtr temp;
}
Now I'm trying to "instantiate" it in my main method but I'm not sure how to accomplish this. This is what I researched and found online but it is still not working-
int main(){
BoardList* first = NULL; //first element will be added after a board object is added to the list that's why i left this as null
}
But I keep getting a "Can't resolve type BoardList" error. I'm using CLion for my IDE.
Board::BoardList* first = NULL;- not forget thatBoardListis inner type and you needBoard::BoardListwhen access it outsideBoard