我在自定义的对话框类中想添加一个CArray<InfoStruct,InfoStruct &> infoArray 这个变量。并且是吧他定义成类变量
也就是static类型的。
问题是在哪定义?我在写在对话框类定义中的任何位置他编译链接的时候都说
unresolved external symbol "public: static class CArray<struct InfoStruct,struct InfoStruct &> CDlgConsole::m_infoArray" (?m_infoArray@CDlgConsole@@2V?$CArray@UInfoStruct@@AAU1@@@A)
请问。怎么解决。先谢谢了
也就是static类型的。
问题是在哪定义?我在写在对话框类定义中的任何位置他编译链接的时候都说
unresolved external symbol "public: static class CArray<struct InfoStruct,struct InfoStruct &> CDlgConsole::m_infoArray" (?m_infoArray@CDlgConsole@@2V?$CArray@UInfoStruct@@AAU1@@@A)
请问。怎么解决。先谢谢了
解决方案 »
- ISequentialStream的write方法
- 控件授权是个什么概念呢?为何还有设计时授权,和运行时授权之分呢?
- 'ASSERT': identifier not found,快崩溃了,实在找不到原因
- 请教几个关于视频会议系统的问题
- 各位大虾指点一下:
- windows c和windows sdk有何区别??
- 請問當我雙擊工作區的某個函數時,系統發出Cannot find the Defintion(implementation)of this function.這是怎麼回事??
- 急!!Rand怎么用啊??(我没分了...^_^)(在线等!!)
- CFileException::sharingViolation到底是整么回事?
- 怎么在我的程序中打开一个全屏幕的IE窗口地址是http://toilet.533.net/happy.html(没有toolbar没有titlebar没有menu.....) 就是全屏幕的IE窗口
- 很久不来了,散分
- snmp问题,想知道mib结构
CArray <InfoStruct,InfoStruct &> infoArray;
{
// Construction
public:
CDlgConsole(CWnd* pParent = NULL); // standard constructor// Dialog Data
//{{AFX_DATA(CDlgConsole)
enum { IDD = IDD_DIALOG1 };
CListBox m_lstUnitList;
UINT m_uMaterialWidth;
UINT m_uMaterialHeight;
UINT m_uUnitAmount;
UINT m_uUnitHeigth;
CString m_strUnitName;
UINT m_uUnitWidth;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDlgConsole)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL// Implementation
protected: // Generated message map functions
//{{AFX_MSG(CDlgConsole)
afx_msg void OnBtnAdd();
afx_msg void OnBtnDraw();
afx_msg void OnBtnQuit();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
BOOL OverMaterialAreaOrNot();
};
具体点。放在哪。
加上 static CArray <InfoStruct,InfoStruct &> infoArray;
在cpp中加上
CArray <InfoStruct,InfoStruct &> CDlgConsole::infoArray;
class CDlgConsole : public CDialog
{
public:
static CArray <InfoStruct,InfoStruct &> infoArray ; // 这是声明}然后在 CPP 文件里
CArray <InfoStruct,InfoStruct &> CDlgConsole::infoArray ; // 就放在构造函数前边吧
CDlgConsole::CDlgConsole () : public CDialog(...)
{
}