0
Explain me inline function with example please fast
2 Réponses
+ 1
an inline is just a function that usually consists of only one return statement for example
int sum (int x, int y){
return x+y
}
usually you declare this functions with the keyword inline because the compiler will handle it in a different way (usually by just copying the code where It is called).
For example in a class you should declare setters and getters inline and defining them directly in the header file
0
thanks
could u please give me a program of inline function
a simple program