CCriticalSection使用问题
我在一个MFC DLL工程中使用CCriticalSection,包含了#include <afxmt.h>
在一个类中生命变量
private:
...
CCriticalSection m_csCache ;
...
但编译时却出现了如下错误:
...
error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject'
...
请问高手们帮帮忙吧!急急急!!
谢谢大家了!!
[解决办法]
Multithreading Sample List
Home | Overview | How Do I | Details | Sample
See the following sample programs that illustrate multithreaded programming:
MTGDI
MTMDI
MTRECALC
MUTEXES
Back to Multithreading Tasks
[解决办法]
cannot access private member declared in class 'CObject'
从这句来看,是不是因为你把CCriticalSection m_csCache 声明为私有的,然后又在非类成员中调用了它啊
改为public试试