別のダイアログボックス[ベースライン]から起動するダイアログボックス[インポート]を取得しようとしています。必要な「.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;
理由を理解するのを手伝ってください。
完全なコード:
baseline.h:http ://freetexthost.com/on06wref6c import.h: http: //freetexthost.com/x4e4dkwrve