class LCalculation
{
public:
unsigned __int64 m_Amount_of_Numbers;
[...]
};
지금 내가 사용하고 이러한 오류에 직면하기 위해 노력하고있어, 다른 클래스에서 클래스 LCalculation의 객체를 만들었습니다. 그것은이 객체 선언과 관련이 있습니다. 나는 단지 그것을 얻지 않는다. 누구든지 이걸 도와 줄 수 있니? 더 많은 정보가 필요하면 언제든지 물어보십시오.
class CMFC_App_CalculationDlg : public CDialogEx
{
private:
LCalculation m_LCalc;
};
- 1> C : 사용자 \ \ 관리 \ 문서 비주얼 스튜디오 2010 \ 프로젝트 \ \ 석회질 \ mfc_app_calculation \ mfc_app_calculationdlg.h (35) : 오류 C2146 : 구문 오류 : ';'이 없습니다. \ C : \ users \ admin \ documents \ Visual Studio 2010 \ projects \ Calc \ mfc_app_calculation \ mfc_app_calculationdlg.h (35) : C4430 : 유형 지정자가없는 것으로 가정합니다. 참고 : C++은 default-int
- 을 지원하지 않습니다. 1> c : \ users \ admin \ documents \ visual 스튜디오 2010 \ projects \ Calc \ mfc_app_calculation \ mfc_app_calculationdlg.h (35) : 오류 C4430 : 유형 지정자가 없습니다. 참고 : \ 사용자 \ 관리자 \ 문서 비주얼 스튜디오 2010 \ 프로젝트 \ \ 석회질 \ mfc_app_calculation \ mfc_app_calculationdlg.cpp : C++ 기본-INT
void CMFC_App_Calculation::OnEnChangeEdit2()
{
m_LCalc.m_Amount_of_Numbers = UpdateData(TRUE);
}
- 1> C 지원하지 않습니다 (191) : 오류 C2065 : 'm_LCalc': 선언되지 않은 식별자
- 1> c : \ users \ admin \ documents \ visual 스튜디오 2010 \ projects \ Calc \ mfc_app_calculation \ mfc_app_calculationdlg.cpp (191) : 오류 C2228 : .m_Amount_of_Numbers '에는/struct/union 클래스가 있어야합니다.
- 유형은
- 유형은
그것을 가져 오기 '알 수없는 형' '내가 여기 새로 왔어'입니다. @ Joachim Pileborg. 감사.
먼저 헤더 :
// MFC_App_Calculation.h : main header file for the PROJECT_NAME application
//
#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include "resource.h" // main symbols
// CMFC_App_CalculationApp:
// See MFC_App_Calculation.cpp for the implementation of this class
//
class CMFC_App_CalculationApp : public CWinApp
{
public:
CMFC_App_CalculationApp();
// Overrides
public:
virtual BOOL InitInstance();
// Implementation
DECLARE_MESSAGE_MAP()
};
extern CMFC_App_CalculationApp theApp;
두 번째 헤더 :
// MFC_App_CalculationDlg.h : header file
//
#pragma once
// CMFC_App_CalculationDlg dialog
class CMFC_App_CalculationDlg : public CDialogEx
{
// Construction
public:
CMFC_App_CalculationDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
enum { IDD = IDD_MFC_APP_CALCULATION_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedRadio1();
afx_msg void OnBnClickedRadio2();
private:
LCalculation m_LCalc;
public:
afx_msg void OnEnChangeEdit2();
};
세 번째 헤더 :
#pragma once
/*Comments*/
class LCalculation
{
public:
unsigned __int64 m_Amount_of_Numbers;
unsigned __int64 m_Amount_of_Guesses;
unsigned __int64 m_Probability;
LCalculation();
bool m_bEqual;
void CalculateThis();
void SZ_true();
void SZ_false();
void NUMBERequals (unsigned __int64 NUMBERS, unsigned __int64 GUESSES, unsigned __int16 IDENTIFIER);
};
'CMFC_App_CalculationDlg'를 정의하는 헤더 파일에'LCalcultation'을 정의하는 헤더 파일을 포함합니까? –
* complete * 및 * unedited * 오류 메시지를 게시 할 수 있습니까? 그리고 소스에서 당신은 그 오류를 지적합니다. 또한'm_LottoBerechnung'은 무엇입니까? –
또한 m_LottoBerechnung 선언 전에 세미콜론을 확인하십시오. 당신이 단순히 한 쌍을 놓치고있는 것 같습니다. –