资源描述:
《两校间最短路径查询器Dlg》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、//两校间最短路径查询器Dlg.cpp:implementationfile//#include"stdafx.h"#include"两校间最短路径查询器.h"#include"两校间最短路径查询器Dlg.h"#ifdef_DEBUG#definenewDEBUG_NEW#defineCHENGYUAN0#defineNONGDA1#defineJIAODA2#defineZHENGFA3#defineSHIDA4#defineZHIXING5#defineMAXSIZE20#defineMAXVALUE214748364.
2、0#defineSWAP(a,b){temp=a;a=b;b=temp;}voidfloyd(floatdist[][MAXSIZE],intpath[][MAXSIZE],intn);//voiddisplay_path(float[][MAXSIZE],float[][MAXSIZE],intn);voidreverse(intx[],intn);//floatdist[MAXSIZE][MAXSIZE];intpath[MAXSIZE][MAXSIZE];intn;charresour[MAXSIZE];chardis
3、tan[MAXSIZE];floatdist[20][20]={{0.0,0.5,MAXVALUE,MAXVALUE,MAXVALUE,MAXVALUE,},{0.5,0.0,3.3,3.5,3.3,MAXVALUE},{MAXVALUE,3.3,0.0,0.4,MAXVALUE,MAXVALUE},{MAXVALUE,3.5,0.4,0.0,0.4,0.7},{MAXVALUE,3.3,MAXVALUE,0.4,0.0,0.9},{MAXVALUE,MAXVALUE,MAXVALUE,0.7,0.9,0.0}};#unde
4、fTHIS_FILEstaticcharTHIS_FILE[]=__FILE__;#endif///////////////////////////////////////////////////////////////////////////////CAboutDlgdialogusedforAppAboutclassCAboutDlg:publicCDialog{public:CAboutDlg();//DialogData//{{AFX_DATA(CAboutDlg)enum{IDD=IDD_ABOUTBOX};//}
5、}AFX_DATA//ClassWizardgeneratedvirtualfunctionoverrides//{{AFX_VIRTUAL(CAboutDlg)protected:virtualvoidDoDataExchange(CDataExchange*pDX);//DDX/DDVsupport//}}AFX_VIRTUAL//Implementationprotected://{{AFX_MSG(CAboutDlg)//}}AFX_MSGDECLARE_MESSAGE_MAP()};CAboutDlg::CAbou
6、tDlg():CDialog(CAboutDlg::IDD){//{{AFX_DATA_INIT(CAboutDlg)//}}AFX_DATA_INIT}voidCAboutDlg::DoDataExchange(CDataExchange*pDX){CDialog::DoDataExchange(pDX);//{{AFX_DATA_MAP(CAboutDlg)//}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(CAboutDlg,CDialog)//{{AFX_MSG_MAP(CAboutDlg)//No
7、messagehandlers//}}AFX_MSG_MAPEND_MESSAGE_MAP()///////////////////////////////////////////////////////////////////////////////CMyDlgdialogCMyDlg::CMyDlg(CWnd*pParent/*=NULL*/):CDialog(CMyDlg::IDD,pParent){//{{AFX_DATA_INIT(CMyDlg)m_School=_T("");m_School1=_T("");m_
8、School2=_T("");m_Path=_T("");//}}AFX_DATA_INIT//NotethatLoadIcondoesnotrequireasubsequentDestroyIconinWin32m_hIcon=AfxGetApp()->LoadIcon(IDR_MAIN