Search:

Type: Posts; User: Megalodon01

Search: Search took 0.00 seconds.

  1. Errors in code

    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....
  2. Fixed code but now getting weird output

    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;
  3. Thank you for helping

    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...
  4. Segmentation fault when executing bounded buffer program

    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...
Results 1 to 4 of 4