当前位置:网站首页>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;
}
边栏推荐
- 美国5G Open RAN再遭重大挫败,抗衡中国5G技术的图谋已告失败
- Function (error prone)
- A survey of automatic speech recognition (ASR) research
- Un réveil de l'application B devrait être rapide
- Network layer - forwarding (IP, ARP, DCHP, ICMP, network layer addressing, network address translation)
- FFmepg使用指南
- Introduction to RT thread kernel (4) -- clock management
- Chapter 6 text processing tools for shell programming (awk)
- Matplotlib draws three-dimensional scatter and surface graphs
- [moteur illusoire UE] il ne faut que six étapes pour réaliser le déploiement du flux de pixels ue5 et éviter les détours! (4.26 et 4.27 principes similaires)
猜你喜欢
2022-2028 global and Chinese video coding and transcoding Market Research Report
Invalid bound statement (not found) in idea -- problem solving
【虚幻引擎UE】实现背景模糊下近景旋转操作物体的方法及踩坑记录
A solution to the problem that variables cannot change dynamically when debugging in keil5
Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery
Scheduling system of kubernetes cluster
Function (error prone)
网络安全-记录web漏洞修复
CSDN正文自动生成目录
Construction d'un Cluster redis sous Windows
随机推荐
Chapter 6 text processing tools for shell programming (awk)
Uncover the seven quirky brain circuits necessary for technology leaders
Neural networks and deep learning Chapter 6: Circular neural networks reading questions
SPI read / write flash principle + complete code
这是一个不确定的时代
Function (error prone)
Setting up redis cluster cluster under Windows
Mxnet imports various libcudarts * so、 libcuda*. So not found
Web开发人员应该养成的10个编程习惯
官宣!第三届云原生编程挑战赛正式启动!
[phantom engine UE] realize the animation production of mapping tripod deployment
C26451: arithmetic overflow: use the operator * on a 4-byte value, and then convert the result to an 8-byte value. To avoid overflow, cast the value to wide type before calling the operator * (io.2)
[untitled]
This is an age of uncertainty
level18
【科普】热设计基础知识:5G光器件之散热分析
Kwai, Tiktok, video number, battle content payment
CSDN正文自动生成目录
介绍汉明距离及计算示例
Neural networks and deep learning Chapter 4: feedforward neural networks reading questions