I'm trying to use the sleep function for a program that simulates a traffic light. But when i use the function it delays the start of the program not between where i have printed light green and light yellow to the screen where i want it.
I have placed it between the two cout statements and it still delays the beginning of the program which makes no sense.
Anyone got any ideas?