I had 'new char' declared as a global variable, but seeing how I only use it in this function I'll declare it as local.
I was expecting to obtain the characters located in the shared buffer....
Type: Posts; User: Megalodon01
I had 'new char' declared as a global variable, but seeing how I only use it in this function I'll declare it as local.
I was expecting to obtain the characters located in the shared buffer....
I was using '*' as a NULL so when the producer read this value it would terminate.
I modified my function to this
void *write_to_buffer (char buffer[])
{
int i=0;
FILE *fp;
Thanks for looking at that portion of code, but instead of receiving "Segmentation Error" upon executing I receive no output.
Here's the portion of code I modified
void *write_to_buffer...
This is my first post, and I'm fairly new at programming. I have a project where I'm recreating the well known bounded buffer problem (producer-consumer). Upon creating these two threads, they share...