??C++???????к?????????????????
?????hemmingway ???????[ 2017/1/3 11:01:44 ] ?????????????? C++
??????????????????????????????????????????????????????У?????????и??????е???????????????????????и????????????????????????????????????????????????????????????????????丸??????????
???????????????????????????????????????????????????????????????????????????????????????′?????
??????????????£?
????1. ?????????ж??幹?????????????????????????????
????2. ???????????????????????????????????????????????????????????????и???????????????????????????????????
????3. ????????????????????????????????????????????????????????????????ι???????
????4. ?????????????????????????????????????????????????????????????ι???????????????????????ι???????
????5. ?????????????????????????????????????????????????????????????????вι?????????????????????????в???????????????????????????????ι?????????
????6. ???????????????????????????????ó??????????????????????磺
#include <iostream.h>
class animal
{
public:
animal(int height?? int weight)
{
cout<<"animal construct"<<endl;
}
…
};
class fish:public animal
{
public:
fish():animal(400??300)
{
cout<<"fish construct"<<endl;
}
…
};
void main()
{
fish fh;
}
??????fish???????????????e???:????????????????????????????????????????????????????????????????????????????????????????
??????????MFC??????CDialog??п??????????????..
??????????
#pragma once
class CDrugDlg : public CDialogEx
{
DECLARE_DYNAMIC(CDrugDlg)
public:
CDrugDlg(CWnd* pParent = NULL); // ?????????
virtual ~CDrugDlg();
// ?????????
enum { IDD = IDD_DRUG_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ???
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnSize(UINT nType?? int cx?? int cy);
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg void OnDestroy();
};
??????????
// DrugDlg.cpp : ??????
//
#include "stdafx.h"
#include "Medical.h"
#include "DrugDlg.h"
#include "afxdialogex.h"
// CDrugDlg ?????
IMPLEMENT_DYNAMIC(CDrugDlg?? CDialog)
CDrugDlg::CDrugDlg(CWnd* pParent /*=NULL*/)
:CDialogEx(CDrugDlg::IDD?? pParent)
{
}
CDrugDlg::~CDrugDlg()
{
}
??????????????????????????????е??????const????????г?????????????????????
class point
{
public:
point():x(0)??y(0)
private:
const int x;
const int y;
};
????????????????????????????????????????г???????????????б????..
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11