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

📄 maxmin.cpp

📁 《精通matlab7.0混合编程》的例子程序
💻 CPP
字号:
// MaxMin.cpp : Defines the initialization routines for the DLL.
//

#include "stdafx.h"
#include "MaxMin.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMaxMinApp

BEGIN_MESSAGE_MAP(CMaxMinApp, CWinApp)
	//{{AFX_MSG_MAP(CMaxMinApp)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMaxMinApp construction

CMaxMinApp::CMaxMinApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CMaxMinApp object

CMaxMinApp theApp;

extern "C" __declspec(dllexport) int Min1(int x,int y,int z) 
{ 
if ((x<=y) & (x<=z)) return x; 
else if ((y<=x) & (y<=z)) return y; 
else return z; /*找出x,y,z中的最小整数*/ 
} 
 
extern "C" __declspec(dllexport) int Max1(int x,int y,int z) 
{ 
if ((x>=y) & (x>=z)) return x; 
else if ((y>=x) & (y>=z)) return y; 
else return z; /*找出x,y,z中的最大整数*/ 
} 

⌨️ 快捷键说明

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