- 博客(0)
- 资源 (1)
- 收藏
- 关注
数据结构 堆排序 MFC
数据结构试验堆排序MFC
// HeapSortDlg.h : header file
//
#if !defined(AFX_HEAPSORTDLG_H__DA227A0F_D8D2_459E_A6AE_1F11F292DDDD__INCLUDED_)
#define AFX_HEAPSORTDLG_H__DA227A0F_D8D2_459E_A6AE_1F11F292DDDD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define LIST_INIT_SIZE 100//线性表储存空间的初始分量
#define LISTINCREMENT 10//线性表储存空间的分配增量
#define OVERFLOW 0
#define OK 1
/////////////////////////////////////////////////////////////////////////////
// CHeapSortDlg dialog
//定义顺序表
typedef int Status;
//typedef int ElemType;
typedef struct
{
int key;
}ElemType;
typedef struct
{
ElemType *elem;//"\r\n"
int length;
int listsize;
}SqList;
//堆采用顺序表储存表示
typedef SqList HeapType;
class CHeapSortDlg : public CDialog
{
// Construction
public:
CHeapSortDlg(CWnd* pParent = NULL); // standard constructor
void HeapSort(HeapType &H);
void HeapAdjust(HeapType &H,int s,int m);
// Dialog Data
//{{AFX_DATA(CHeapSortDlg)
enum { IDD = IDD_HEAPSORT_DIALOG };
CString m_input;
CString m_output;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHeapSortDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CHeapSortDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnInput();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HEAPSORTDLG_H__DA227A0F_D8D2_459E_A6AE_1F11F292DDDD__INCLUDED_)
2011-05-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人