Mega Code Archive
Inline functions work best on short functions that are used repeatedly This example calculates the square of an integer
#include
using namespace std;
inline long squareit(int iValue) {return iValue * iValue;}
int main()
{
int iValue = 5;
cout << squareit(iValue) << endl;
return (0);
}