console multithreaded app - duplicated lines with printf

Hi all. I am developing an small sized console based application. I am using ANSI C and some win32 api functions. My app uses four execution threads. For debugging purposes, i am writing messages to the console window with a simple printf() statement, but it doesnt work too fine, because when i run the app i can see the same message written in the console window one, two and up to three times. The number of times the app writes the messages to the output window seems to follow a random fashion. Someone told me about a Microsoft reported incompatibility issue with console multithreaded applications that could explain this app behaviour, but i couldnt find any further information on this subject searching the web. do you have any idea what could be going on and any possible solution. As IDE, i am using Visual C++ Studio 6.0.

Early responses will be welcomed
In advance, many thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!