Functions that are decorated by inline are called inline function \
This is a just suggestion for the compiler, and the compiler may not necessarily follow your advice
Advantages: speed up the operation of efficiency
Disadvantages: expand the space
That is space for time
#include <iostream>
using namespace std;
inline void f(int i);
// F.cpp
#include "F.h"
void f(int i)
{
cout << i << endl;
}
// main.cpp
#include "F.h"
int main()
{
f(10);
return 0;
}
Though these is seems useless, I added a picture to look more substantial
Thank you for watching