📄 multisort.h
字号:
// MultiSort.h : main header file for the MULTISORT application
//
#if !defined(AFX_MULTISORT_H__21941A3D_9FF7_4CAE_8FB1_17D72093237B__INCLUDED_)
#define AFX_MULTISORT_H__21941A3D_9FF7_4CAE_8FB1_17D72093237B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CMultiSortApp:
// See MultiSort.cpp for the implementation of this class
//
class CMultiSortApp : public CWinApp
{
public:
CMultiSortApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMultiSortApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMultiSortApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
struct Data
{
int data[5]; //5个关键字
int next; //用于分配收集时形成静态链表
};
struct Distribute
{
int tail; //表尾
int next; //表头
};
class Sort
{
public:
CString result; //以CString存放排序结果
int priority[5]; //优先级别
int size; //记录个数
int keynum; //关键字个数
struct Data msort[10000];
void ChangetoInt(CString text);
void Init();
int LSDsort_a();
int LSDsort_b(int &head);
int MSDsort();
int disclt(int x,int &head);
int comb(int x,int start,int end);
int combPass(struct Data sortA[],struct Data sortB[],int x,int len,int start,int end);
int combine(struct Data sortA[],struct Data sortB[],int x,int y,int z,int key);
CString Result();
CString Result(int head);
};
extern CString result;
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MULTISORT_H__21941A3D_9FF7_4CAE_8FB1_17D72093237B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -