我试图让一个对话框 [import] 从另一个对话框 [baseline] 启动。我包含了所需的“.h”文件,但是我根本无法创建导入类的实例。我得到的错误是这样的:
Error 1 error C2146: syntax error : missing ';' before identifier 'iDlg' h:\shaunak\projects\sar_ccd\sar_ccd\baseline.h 202 1 Sar_CCD
导致此 [baseline.h] 的代码行:
#include "Markup.h"
#include<stdio.h>
#include<math.h>
#include "baseline_func.h"
#include "resource.h"
#include "Functions.h"
#include <stdlib.h>
#include "Sar_CCDDoc.h"
#include "Sar_CCDView.h"
#include <vector>
#include "MemAlloc.h"
#include "ReadFiles.h"
#include<vector>
#include<map>
#include "afxwin.h"
#include "import.h"
#include "Geocode.h"
**<SNIP: Taking out the irrelevant lines>**
afx_msg void OnDestroy();
virtual void PostNcDestroy();
afx_msg void OnBnClickedNxtBase();
CButton nextBaseline;
import iDlg; //doesnt work!
CGeocoding cx; //works!!!
};
但是,如果我像这样使用相同的 sysntax 创建另一个类 [Geocoding] 的实例,它可以正常工作:
#include "Geocoding.h"
CGeocoding cx;
请帮我弄清楚原因。
完整代码:
基线.h:http: //freetexthost.com/on06wref6c import.h:http ://freetexthost.com/x4e4dkwrve