2013-06-23 71 views

回答

0

你不提你要使用哪种类型的互斥锁:

如果它的并行线程互斥,那么:

#include <pthread.h> 

如果它是C++ 11互斥,那么:

#include <mutex> 

(你还需要与-std=c++11编译)。