Jumat, 06 Januari 2017

Templates vs Macros which is better to use in Programming?

As templates and macros perform similar tasks, we need know what is the difference between them. Following are the differences between templates and macros: Guidelines for Using Template Functions   While using template functions, programmer must take care of the following:   Generic Data Types   Every template data type (or generic data type) should be used as types in the function template definition as type of parameters. If not used, it will result in an error. Consider the following example which leads to an error: 1 2 3 4 5 template<class Type> void summ(int x, int y) //Error since

The post Templates vs Macros which is better to use in Programming? appeared first on Coding Security.


Templates vs Macros which is better to use in Programming?
read more

Tidak ada komentar:

Posting Komentar