Загрузка...

C++ Programming- inline Function in C++

Easy way Easy to learn C++ programming in simple and easy steps way Also includes the Syllabus of Classes XIth & XIIth. inline function in C++ is only a request to the compiler, not a command. Compiler can ignore the request for inline. Compiler may not perform inline function in such circumstances like: 1) If a function contains a loop. (for, while, do-while) 2) If a function contains static variables. 3) If a function is recursive. 4) If a function return type is other than void, and the return statement doesn’t exist in function body. 5) If a function contains switch or goto statement. Inline functions in c++ provide following advantages: 1) Function call overhead doesn’t occur. 2) It also saves the overhead of push/pop variables on the stack when function is called. 3) It also saves overhead of a return call from a function. 4) When you inline a function, you may enable compiler to perform context specific optimization on the body of function. Such optimizations are not possible for normal function calls. Other optimizations can be obtained by considering the flows of calling context and the called context. 5) Inline function may be useful (if it is small) for embedded systems because inline can yield less code than the function call preamble and return. ------------------------------------------------------------------------------------------------------------------------------------------------------------- LINK RELATED PROGRAMS C++ programs:https://github.com/saritaverma60/OOPs-programming LINK RELATED PROGRAMS Python programs :https://github.com/saritaverma60/python-program LINK FOR COMPLETE PLAYLIST :https://www.youtube.com/watch?v=qdEyLSkkYZQ&list=PLNY8CSQ-shJPrEedTZUG_G47zyKAkeOIy FACEBOOK LINK: https://www.facebook.com/Kundan-Tutorial-1927301307292166/?modal=admin_todo_tour #Kundantutorial #inlinefunction

Видео C++ Programming- inline Function in C++ автора Разработка умных ботов для начинающих: шаг за шагом
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять