Inline function prototype vs regular declaration vs prototype
What's the difference between inline function and then main like so: inline double cube(double side) { return side * side * side; } int main( ) { cube(5); } vs just declaring a function regularly like: double cube(double side) { return side * side * side; } int main( ) { cube(5); } vs function prototype? double cube(double); int main( ) { cube(5); } double cube(double side) { return side * side * side; } An inline function can be defined in multiple translation units (cpp file + includes), and is a hint to the compiler to inline the function. It is usually placed in a header which increases