In my program, I am using threads since I want several functions to be running at the same time. However, this produces some problems when data is cout on the console. Since