当前位置:网站首页>Inline built-in function
Inline built-in function
2022-07-05 04:34:00 【On the bald Road】
How to write it : It can be declared and defined in full inline You can also write only when declaring .
purpose : Before calling this function inline The information of informs the compiling system , The compilation system will handle function calls as built-in functions . If you call many times or have requirements for call efficiency, you can declare to ask the built-in function ;
Be careful !: The built-in function declaration only suggests the system , Not instructions .
Only simple functions with small scale and frequent calls are applicable .
Example :
#include<iostream>
using namespace std;
inline int max(int, int, int);
int main() {
int a = max(5, 6, 9);
cout << a;
return 0;
}
int max(int a, int b, int c) {
int maxword = a;
if (a < b) {
maxword = b;
}
if (maxword < c) {
maxword = c;
}
return maxword;
}边栏推荐
- 机器学习 --- 神经网络
- Setting up redis cluster cluster under Windows
- mxnet导入报各种libcudart*.so、 libcuda*.so找不到
- 【UNIAPP】系统热更新实现思路
- Matplotlib draws three-dimensional scatter and surface graphs
- Interview related high-frequency algorithm test site 3
- All in one 1413: determine base
- TPG x AIDU|AI领军人才招募计划进行中!
- [finebi] the process of making custom maps using finebi
- 函數(易錯)
猜你喜欢

Cookie learning diary 1

Network security - record web vulnerability fixes

User behavior collection platform

自动语音识别(ASR)研究综述

函数(易错)

Learning notes 8

【虛幻引擎UE】實現UE5像素流部署僅需六步操作少走彎路!(4.26和4.27原理類似)

Setting up redis cluster cluster under Windows

10 programming habits that web developers should develop
![[phantom engine UE] the difference between running and starting, and the analysis of common problems](/img/e2/49d6c4777c12e9f4e3f8b6ca6db41c.png)
[phantom engine UE] the difference between running and starting, and the analysis of common problems
随机推荐
函数(基本:参数,返回值)
TPG x AIDU | AI leading talent recruitment plan in progress!
【虚幻引擎UE】实现UE5像素流部署仅需六步操作少走弯路!(4.26和4.27原理类似)
Moco is not suitable for target detection? MsrA proposes object level comparative learning target detection pre training method SOCO! Performance SOTA! (NeurIPS 2021)...
Mixed compilation of C and CC
[crampon programming] lintcode decoding Encyclopedia - 1100 strange printer
Leetcode 222 number of nodes of complete binary tree
Uncover the seven quirky brain circuits necessary for technology leaders
This is an age of uncertainty
可观测|时序数据降采样在Prometheus实践复盘
Official announcement! The third cloud native programming challenge is officially launched!
Label exchange experiment
官宣!第三届云原生编程挑战赛正式启动!
Network security - record web vulnerability fixes
【科普】热设计基础知识:5G光器件之散热分析
【虚幻引擎UE】运行和启动的区别,常见问题分析
Wenet: E2E speech recognition tool for industrial implementation
CSDN正文自动生成目录
A solution to the problem that variables cannot change dynamically when debugging in keil5
Interview related high-frequency algorithm test site 3