Hi all,

my requirement is there is a function which creates one thread and passes the data for further processing which looks like
void MyFunc(char *data)
{
CreateThread(NULL,0,build_data,(void *)data,0,NULL);
}
Now i want to modify the above code.

I want to introduce a queue class and want to create two threads so that 1st thread can invoke a function which writes the data to the queue and the 2nd thread reads the data from the queue. Please introduce mutex if required.
Can you tell me how to implement the above in VC++.