SlideShare a Scribd company logo
INLINE FUNCTION Lecture 2.3
Prepared by: Mian Saeed Akbar
Inline function
 Keyword inline before function
 Asks the compiler to copy code into program instead of making function call
 Reduce function-call overhead
 Compiler can ignore inline
 Good for small, often-used functions
inline double cube(double s ){
return s * s * s;
}
Thank you
Please subscribe my channel for more videos
and courses

More Related Content

PDF
Lecture 1.3 A Simple Program to Print a Line of Text.pdf
PDF
Lecture 2.8 Arrays.pdf
PDF
Lecture 2.2 Default Arguments.pdf
PDF
Lecture 2.6 Function Templates.pdf
PDF
Lecture 2.4 Recursion.pdf
PDF
Lecture 3 Structures in C++.pdf
PDF
Lecture 2.5 Function Overloading.pdf
PDF
Lecture 1.11 Break and Continue Statements.pdf
Lecture 1.3 A Simple Program to Print a Line of Text.pdf
Lecture 2.8 Arrays.pdf
Lecture 2.2 Default Arguments.pdf
Lecture 2.6 Function Templates.pdf
Lecture 2.4 Recursion.pdf
Lecture 3 Structures in C++.pdf
Lecture 2.5 Function Overloading.pdf
Lecture 1.11 Break and Continue Statements.pdf

More from MianSaeedAkbar1 (12)

PDF
Lecture 2.1 Functions.pdf
PDF
Lecture 1.5 Variables.pdf
PDF
Lecture 1.2 Basics of a typical C++ Environment.pdf
PDF
Lecture 1.8 Conditional Structures.pdf
PDF
Lecture 2.7 Type Conversion in C++.pdf
PDF
Lecture 1.6 Arithmetic and Relational Operators.pdf
PDF
Lecture 1.7 C++ Keywords.pdf
PDF
Lecture 1.4 Escape Sequence.pdf
PDF
Lecture 1.9 Switch Structure.pdf
PDF
Lecture 1.10 Repetition Structures.pdf
PDF
Lecture 0 Object Oriented Programming.pdf
PDF
Lecture 1.1 Introduction to Computer Languages.pdf
Lecture 2.1 Functions.pdf
Lecture 1.5 Variables.pdf
Lecture 1.2 Basics of a typical C++ Environment.pdf
Lecture 1.8 Conditional Structures.pdf
Lecture 2.7 Type Conversion in C++.pdf
Lecture 1.6 Arithmetic and Relational Operators.pdf
Lecture 1.7 C++ Keywords.pdf
Lecture 1.4 Escape Sequence.pdf
Lecture 1.9 Switch Structure.pdf
Lecture 1.10 Repetition Structures.pdf
Lecture 0 Object Oriented Programming.pdf
Lecture 1.1 Introduction to Computer Languages.pdf
Ad

Recently uploaded (20)

PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
Classroom Observation Tools for Teachers
PDF
advance database management system book.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Introduction to Building Materials
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Lesson notes of climatology university.
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
Complications of Minimal Access Surgery at WLH
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
Trump Administration's workforce development strategy
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
1_English_Language_Set_2.pdf probationary
PDF
Empowerment Technology for Senior High School Guide
Indian roads congress 037 - 2012 Flexible pavement
Classroom Observation Tools for Teachers
advance database management system book.pdf
Cell Types and Its function , kingdom of life
Introduction to Building Materials
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Lesson notes of climatology university.
What if we spent less time fighting change, and more time building what’s rig...
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Complications of Minimal Access Surgery at WLH
UNIT III MENTAL HEALTH NURSING ASSESSMENT
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Chinmaya Tiranga quiz Grand Finale.pdf
LDMMIA Reiki Yoga Finals Review Spring Summer
Trump Administration's workforce development strategy
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
1_English_Language_Set_2.pdf probationary
Empowerment Technology for Senior High School Guide
Ad

Lecture 2.3 Inline Function.pdf

  • 1. INLINE FUNCTION Lecture 2.3 Prepared by: Mian Saeed Akbar
  • 2. Inline function  Keyword inline before function  Asks the compiler to copy code into program instead of making function call  Reduce function-call overhead  Compiler can ignore inline  Good for small, often-used functions inline double cube(double s ){ return s * s * s; }
  • 3. Thank you Please subscribe my channel for more videos and courses