Use containers from the STL
This module builds on a previous module but is not part of the cumulative modular program. Save a copy of the previous module so you have a known place to start in case of catastrophe! Design your changes. Review the design. Then, and only then, start coding!
In Module F you implemented a simulation of a traffic intersection using queues to hold the cars. You will replace the queue you wrote and use the queue container from the STL.
You will run both programs with identical settings. Compare the results. Are they consistent? They wont be identical but should be within range of each other.
Is there a simple modification you can make to ensure they are doing the same calculations correctly? HINT: it involves the seed.
NOTE: De-allocate memory as appropriate.
Reviews
There are no reviews yet.