间不同我在的.cpp静态Mutext和不是静态互斥
namespapce A
{
namespace
{
static CMutex initMutex;
}
void init()
{
//code here
}
void uninit()
{
//code here
}
}
一个代码,如果我删除的互斥静态什么是不同的,如果有一个静态的?静态的用途是什么?
谢谢!
'namespace'是故意未命名的吗? – 2013-04-05 08:09:16
我认为这是一个重复的:http://stackoverflow.com/questions/11623451/static-vs-non-static-variables-in-namespace – maditya 2013-04-05 08:10:14
是的,它的匿名命名空间,以便其他代码不能使用它。 – domlao 2013-04-05 08:10:37