This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
Re: Simple question.
- From: "Wayne Robin Isaacs" <wisaacs at io dot com>
- To: "Kyle Boon" <kboon at bmi dot osu dot edu>, <pthreads-win32 at sources dot redhat dot com>
- Date: Wed, 21 Aug 2002 18:21:58 -0400
- Subject: Re: Simple question.
- References: <20020821190248.28CFB3BDBF@toledo.bmi.ohio-state.edu>
Here's an example:
#include <iostream.h>
#include <process.h>
#include <strstrea.h>
// use a buffer to collect your data before the "cout" call
void threadfn(void*) {
strstream x;
for(int i=100;i--;) {
x << "o" << "o" << '\n' << '\0';
cout << x.str();
}
}
Wayne
----- Original Message -----
From: "Kyle Boon" <kboon@bmi.osu.edu>
To: <pthreads-win32@sources.redhat.com>
Sent: Wednesday, August 21, 2002 3:02 PM
Subject: Simple question.
> I'm not sure if this is the right place for my question - so I apolgize in
> advance if it not.
>
> First some quick background. I am a college undergrad charged with porting a
> linux app to the win32 platform. I chose this pthreads implementation to make
> the task much easier. So far it's worked very well. My only question is how
> people deal with console output. I have multiple threads using cout to print
> things to the console, but the output is all jumbled up. If I try to link
> with a thread safe version of the standard library on windows, I get all
> sorts of linker errors. It seems like people must have had to work around
> this before, but I haven't been able to find any information about it.
>
> Any help would be greatly appreciated.
> Kyle Boon
>