Start here · Essential guide
The inline Keyword in C++
Learn how the inline keyword in C++ works, why inline functions belong in header files, how inline variables work in C++17, and when the compiler ignores it.
Syntax and Functions
What the inline keyword does and how inline functions differ from macros.
Start here · Essential guide
Learn how the inline keyword in C++ works, why inline functions belong in header files, how inline variables work in C++17, and when the compiler ignores it.
__LINE__ is a predefined macro that expands to the current source line number in C and C++. Examples show printing it, logging with __FILE__, and #line.
A macro is text the preprocessor substitutes before compiling, while an inline function is a real function the compiler type-checks. Learn the differences.
The original C standard defines 32 keywords. See the full list grouped by purpose, plus the words later C versions added, such as inline and restrict.
Related topics