answersLogoWhite

0


Best Answer

Template function would be global, they would have effect on all the pages within the template. Inline, would be regarding a specific line of code within a table or Div tag.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is difference between template and inline functions?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between inline and const?

Everything. "inline" refers to functions, "const" refers to variables.


What is the difference between an outline and inline?

For the inline functions compiler just copies the function code in that place and when the size is too big it treats that function as ordinary function.


What are the disadvantages of inline functions?

The inline functions is an optimization technique that is used by the compilers. The disadvantage of the inline functions is the increased binary size.


What is the difference between v engine and inline engine?

The difference between a v engine and inline engine is that in v type engine the pistons and cylinders are aligned in in a v shape and in an inline type engine the pistons and cylinders are all vertical or inline with each other.


Difference between normal function inline function?

gffg


What is the difference between an inline graphic and a floating graphic?

inline is picture staying still and floating graphic is moving around


Is inline function a command?

No, functions (inline or other) aren't commands.


Program to Find total and average for given 2 numbers using functions with default arguments static data member and friend function?

Finding the total and average of two numbers does not require a function, let alone one with default arguments. Static data members and friend functions apply to classes and you don't need those either. If functions are really required (they are not), then two template functions are all you really need. template<typename T> T total(T& a, T& b){ return(a+b);} template<typename T> T average(T& a, T& b){ return((a+b)/2);} Note that since this is nothing more than basic arithmetic, functions would be overkill since you can easily inline expand this code by hand. You're not really saving anything by writing functions such as these. The compiler may well inline expand them anyway, but debug code is never inline expanded so these function calls would actually be detrimental to debug code.


Difference between inline code and code behind model?

Inline code is written in html file. code behind is written in separate file.


When will you create a template function in c plus plus?

You will create a template function whenever you have a function implementation that can be overloaded to cater for more than one type. Rather than re-write the same implementations over and over to cater for each type you might use now or in the future, you template the type and write one version of the function. The compiler will then generate all the necessary overloads for you on an as-required basis. This helps reduce maintenance when you need to alter the implementation because the code is all in one place, so there is no need to duplicate your changes by hand, which is both time-consuming and prone to error. Template functions are intended as an alternative to macro functions. While macros do have their uses, particularly in debug code, they are not type safe and cannot be debugged. Moreover, macros are always inline expanded whereas template functions are only inline expanded when the compiler's optimisers determine that there is an advantage in doing so.


Whats the difference between inline and ice hockey girdles?

There is no difference i have friends that play Inline Hockey and Ice Hockey and they use the same girdles. -- Inline Hockey girdles are supposed to be worn under pants, so often the surrounding nylon is not much robust, and they are tighter to the body.


What is the difference between an floating object and a inline object?

A floating object can be moved independently of the surrounding text characters.