Question: second.cpp:44:4: error: Stats was not declared in this scope Stats simulationStats(global_args.simLength, global_args.maxThreadSleep, ^ second.cpp:49:22: error: buffer_initialize was not declared in this scope buffer_initialize(); ^ second.cpp:88:55:

second.cpp:44:4: error: Stats was not declared in this scope Stats simulationStats(global_args.simLength, global_args.maxThreadSleep, ^ second.cpp:49:22: error: buffer_initialize was not declared in this scope buffer_initialize(); ^ second.cpp:88:55: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] tempStats = (int*) pthread_join( tidP[i], NULL ); ^ second.cpp:90:8: error: simulationStats was not declared in this scope simulationStats.totalThreadNumProduced[i] = tempStats[0]; ^ second.cpp:99:55: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] tempStats = (int*) pthread_join( tidC[i], NULL ); ^ second.cpp:101:8: error: simulationStats was not declared in this scope simulationStats.totalThreadNumConsumed[i] = tempStats[0]; ^ second.cpp:107:4: error: simulationStats was not declared in this scope simulationStats.numItemsRemaining = bufferCount; ^ second.cpp:107:40: error: bufferCount was not declared in this scope simulationStats.numItemsRemaining = bufferCount; ^ second.cpp: In function void* producer(void*): second.cpp:246:11: error: bufferCount was not declared in this scope if(bufferCount == BUFFER_SIZE) ^ second.cpp:254:19: error: bufferEmpty was not declared in this scope sem_wait( &bufferEmpty ); ^ second.cpp:257:29: error: mutex was not declared in this scope pthread_mutex_lock( &mutex ); ^ second.cpp:260:45: error: buffer_insert_item was not declared in this scope if(runSim && buffer_insert_item(bItem)) ^ second.cpp:268:29: error: buffer_print was not declared in this scope buffer_print(); //print snapshots ^ second.cpp: In function void* consumer(void*): second.cpp:320:11: error: bufferCount was not declared in this scope if(bufferCount == 0) ^ second.cpp:330:19: error: bufferFull was not declared in this scope sem_wait( &bufferFull ); ^ second.cpp:333:29: error: mutex was not declared in this scope pthread_mutex_lock( &mutex ); ^ second.cpp:336:47: error: buffer_remove_item was not declared in this scope if(runSim && buffer_remove_item( &bItem)) //consumes in if statement ^ second.cpp:350:29: error: buffer_print was not declared in this scope buffer_print(); i have these errors how to fix them

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!