In line function is created with the help of inline specifier.
e.g.-
inline int even(int x) { return !(x%2); } int main( ) { if(even(10)) cout<<"10 is even\n"; if(even(11)) cout<<"11 is even \n"; return 0; }
Liked By
Write Answer
How to create a inline function C plus plus?
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
AVADHESH PATEL
15-Jun-2013