⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mfcdlg.h

📁 六种排序算法的比较 冒泡排序
💻 H
字号:
// MFCDlg.h : header file
//

#if !defined(AFX_MFCDLG_H__81FE5E1B_E817_473C_8E07_B8C1E90D2E6B__INCLUDED_)
#define AFX_MFCDLG_H__81FE5E1B_E817_473C_8E07_B8C1E90D2E6B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CMFCDlg dialog

class CMFCDlg : public CDialog
{
// Construction
public:
	int **Arrary,*arrary,*temp1;
	int compare[2];//第一行存储比较次数,第二行存储交换次数
	//初始化数组
	int result[3][2][7];
	int max;
	CString aa;
	CString shuzu[3];
	CString jilu[2];
	CString answer[6];
	CString M_Out;
	int Rand_Biao;
    void ShellInsert(int *temp,int n,int dk,int *compare);
    void Copy(int *arrary,int *temp,int n);
	int Partition(int *arrary,int n,int low,int high,int *compare);
	void QSort(int *arrary,int n,int low,int high,int *compare);
	void HeapAdjust(int *arrary,int n,int s,int m,int *compare);

	CMFCDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMFCDlg)
	enum { IDD = IDD_MFC_DIALOG };
	CListCtrl	m_list;
	CString	m_compare;
	CString	m_change;
	CString	m_compare1;
	CString	m_change1;
	CString	m_compare2;
	CString	m_change2;
	int		m_size;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMFCDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMFCDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnCompare();
	afx_msg void OnMakerand();
	afx_msg void OnInsertsort();
	afx_msg void OnClearresult();
	afx_msg void OnClearall();
	afx_msg void OnSelectsort();
	afx_msg void OnBubblesort();
	afx_msg void OnShellsort();
	afx_msg void OnQuicksort();
	afx_msg void OnHeapsort();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MFCDLG_H__81FE5E1B_E817_473C_8E07_B8C1E90D2E6B__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -