#include <iostream>
using namespace std;
/*内联函数
内联函数在编译时将函数体嵌入在每一个调用处.
主义:
不用在循环和switch语句中
必须出现在第一次调用之前
不能进行一场接口声明
若是内联函数代码多,逻辑复杂,编译器会将该函数自动处理为普通函数
*/
inline bool IsEqual(int a,int b)
{
if(a==b)
return true;
else
return false;
}
int main()
{
cout<<"判断两数字是否相等\n";
int a(5),b(5);
bool flag=IsEqual(a,b);
cout<<flag;//这里显示的是0或1
cout<<"\n";
cin.get();// 停止屏幕
}