Error using CCriticalSection? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Error using CCriticalSection?

shine_onshine_on Posts: 24Member
I'm getting an error "error C2079: '_m' uses undefined class 'CCriticalSection'" when I try to run the following:

class CCriticalSection;

class myClass{

CCriticalSection m_lock;

}


Can anyone help me out?
TIA

Comments

  • shine_onshine_on Posts: 24Member
    : I'm getting an error "error C2079: '_m' uses undefined class 'CCriticalSection'" when I try to run the following:
    :
    : class CCriticalSection;
    :
    : class myClass{
    :
    : CCriticalSection m_lock;
    :
    : }
    :
    :
    : Can anyone help me out?
    : TIA
    :

  • shine_onshine_on Posts: 24Member
    Its ok, forgot to include afxmt.h :)


    : : I'm getting an error "error C2079: '_m' uses undefined class 'CCriticalSection'" when I try to run the following:
    : :
    : : class CCriticalSection;
    : :
    : : class myClass{
    : :
    : : CCriticalSection m_lock;
    : :
    : : }
    : :
    : :
    : : Can anyone help me out?
    : : TIA
    : :
    :
    :

Sign In or Register to comment.