cari

Rumah  >  Soal Jawab  >  teks badan

在c++中提示错误此声明没有存储类或类型说明符?

#include "StdAfx.h"

#include "CoolControlsManager.h"

// If you don't want to see extra TRACE diagnostics,
// modify the line below to: #define CCM_TRACE
#define CCM_TRACE TRACE

#define CCM_TIMER_VAL 100        // 100 ms timer period seems to be good enough...
#define MAX_CLASSNAME 64         // Length of buffer for retrieving the class name

////////////////////////////////////////////////////////////////////////
// CCMControl static members initialization

HWND CCoolControlsManager::CCMControl::m_hWndOld = NULL;
CCoolControlsManager::m_ctrlMap = CMapPtrToPtr(10);
CCoolControlsManager::m_dlgMap = CMapPtrToPtr(10);
BOOL CCoolControlsManager::m_bEnabled = true;

// Changed 02.03.1999 Mike Walter
 CCoolControlsManager::m_threadMap = CMapWordToPtr(10);

///////////////////////////////////////////////////////////////////////
// Here is the one and only CCoolControlsManager object
static CCoolControlsManager g_ctrlManager;

CCoolControlsManager& GetCtrlManager()
{
   return g_ctrlManager;
}

3.错误提示

巴扎黑巴扎黑2808 hari yang lalu1067

membalas semua(1)saya akan balas

  • PHP中文网

    PHP中文网2017-04-17 14:37:44

    没有看见你类的声明
    你定义静态变量的时候,需要变量的类型啊。

    CMapPtrToPtr CCoolControlsManager::m_ctrlMap = CMapPtrToPtr(10);
    CMapPtrToPtr CCoolControlsManager::m_dlgMap = CMapPtrToPtr(10);
    CMapPtrToPtr CCoolControlsManager::m_threadMap = CMapWordToPtr(10);

    balas
    0
  • Batalbalas