我程序里面用到一个common模块 里面是一些要用的函数,在其他程序上用没问题,但是在这次的使用上就出现问题了
我首先把错误信息发下:
e:\c++\xmlser\common\commonfun.h(428) : error C2146: syntax error : missing ';' before identifier 'listctrl'
e:\c++\xmlser\common\commonfun.h(428) : error C2501: 'CListCtrl' : missing storage-class or type specifiers
e:\c++\xmlser\common\commonfun.h(428) : error C2501: 'listctrl' : missing storage-class or type specifiers
e:\c++\xmlser\common\commonfun.h(452) : error C2146: syntax error : missing ';' before identifier 'LoadSysStr'
e:\c++\xmlser\common\commonfun.h(452) : error C2501: 'CString' : missing storage-class or type specifiers
e:\c++\xmlser\common\commonfun.h(452) : fatal error C1004: unexpected end of file found
对应第一个错误的代码是:
struct SortData
{
CListCtrl* listctrl; //CListCtrl控件指针就是这里啦!!
int isub; //l列号
int seq; //1为升序,0为降序
};
头文件包含在里面呀 怎么CListCtrl和CString都不能用了呢 ?
我首先把错误信息发下:
e:\c++\xmlser\common\commonfun.h(428) : error C2146: syntax error : missing ';' before identifier 'listctrl'
e:\c++\xmlser\common\commonfun.h(428) : error C2501: 'CListCtrl' : missing storage-class or type specifiers
e:\c++\xmlser\common\commonfun.h(428) : error C2501: 'listctrl' : missing storage-class or type specifiers
e:\c++\xmlser\common\commonfun.h(452) : error C2146: syntax error : missing ';' before identifier 'LoadSysStr'
e:\c++\xmlser\common\commonfun.h(452) : error C2501: 'CString' : missing storage-class or type specifiers
e:\c++\xmlser\common\commonfun.h(452) : fatal error C1004: unexpected end of file found
对应第一个错误的代码是:
struct SortData
{
CListCtrl* listctrl; //CListCtrl控件指针就是这里啦!!
int isub; //l列号
int seq; //1为升序,0为降序
};
头文件包含在里面呀 怎么CListCtrl和CString都不能用了呢 ?
//#if !defined(AFX_STDAFX_H__3A72B905_628E_468A_98BC_C4410C2F4756__INCLUDED_)
#define AFX_STDAFX_H__3A72B905_628E_468A_98BC_C4410C2F4756__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls