So I need some help, I am working with an STL list, std::listlinkedList = std::list{50}; how can i iterate througth the list andlook for empty or nodes that are false only in between, For exampleafter i have filled my list randomly, i want to check for nodesthat are not in use, xxx0xxx00xx000xxxxx = 3 (x=in use 0=empty) and000xx00xx00x00000end of list. = 2. I am trying to count the groupof nodes that are in between that are not in used. I hope this makesense.
I am using a struct such that: struct
Node { bool inUse = false; int pID = 0; };
and my list:
std::list linkedList = std::list{50};
So I need some help, I am working with an STL list, std::list linkedList = std::list{50}; how can i iterate througth the
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am