/ Published in: C++
basic demonstration in inline functions in c++
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#include <iostream> // Vamsi // Code to show inline functions in c++ using namespace std; inline float mul(float a, float b) { return (a*b); } inline float div(float a, float b) { return (a/b); } int main () { float a = 10; float b= 20; cout << mul(10,20) << endl ; cout << div(10,20) << endl ; return 0; }
URL: http://vamsii.com