C++ Thread Program!

katulu50

New Member
Hi, Im developing a traffic jam simulation program using C++ Threads. Any tip or hint would be great. Thank you so much.
 
Simulation

Around an avenue of the city a group of ten vehicles circulates at different speeds - they take between 20 and 40 seconds going from a corner to the following one. Each corner is a traffic light that controls the traffic. Using the concepts of multithreading and sections critics, I need to create a program in C++, to simulate the movement of the traffic in five blocks.
 
Around an avenue of the city a group of ten vehicles circulates at different speeds - they take between 20 and 40 seconds going from a corner to the following one. Each corner is a traffic light that controls the traffic. Using the concepts of multithreading and sections critics, I need to create a program in C++, to simulate the movement of the traffic in five blocks.

I don't know how can I do this, please any tip will be helpful
 
Programming forums tends to shoot you down, especially because that sounds like an assignment. They'll most likely tell you to go and do it yourself.

Does this need graphics or do you just need to log information to the terminal?
 
Programming forums tends to shoot you down, especially because that sounds like an assignment. They'll most likely tell you to go and do it yourself.
Yeah. I was going to say this sounds like homework.

Without telling you exactly what to do, figure out what you have to do to make the prgram work with a single thread. Once you've got that done, look at what could/should run in it's own thread.
 
Back
Top