So I need some help, I am working with an STL list, std::list linkedList = std::list{50}; how can i iterate

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

So I need some help, I am working with an STL list, std::list linkedList = std::list{50}; how can i iterate

Post by answerhappygod »

So I need some help, I am working with an STL list,std::list<Node> linkedList = std::list<Node>{50}; howcan i iterate througth the list and look for empty or nodes thatare false only in between, For example after i have filled my listrandomly, i want to check for nodes that are not in use,xxx0xxx00xx000xxxxx = 3 (x=in use 0=empty) and 000xx00xx00x00000endof list. = 2.
I am trying to count the group of nodes that are in between thatare not in used. I hope this make sense.
I am using a struct such that:
and my list:
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply