What is a template in c++, C/C++ Programming

Templates permit to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until particular point they fulfil the functionality of a macro. Its prototype is any of the two following ones:

template function_declaration; template function_declaration;

The only difference among both prototypes is the use of keyword class or typename, its use is indistinct since both expressions have exactly the similar meaning and behave exactly the similar way.            

 

 

Posted Date: 4/8/2013 5:41:08 AM | Location : United States







Related Discussions:- What is a template in c++, Assignment Help, Ask Question on What is a template in c++, Get Answer, Expert's Help, What is a template in c++ Discussions

Write discussion on What is a template in c++
Your posts are moderated
Related Questions
Functions Overloading This a capability in which a C++ program can have several functions performing similar tasks on different data types. When an overloaded function is calle

the program that solve the efficiency of otto cycle

Prepare a MT4 EA to clone MT4 Trades to a Binary Options Platform Project Description: I want an EA that clones MT4 Trades to Globaltrader365, GT Options and if possible othe

#question.develop an algorithm using pseudocode for computing cos(x) and sin(x). use a sentinel controlled while loop. use the series definition of e^+-jx


how we use the cin command and why we use this command????


Objectives: The objective of this assignment is to use C++ to queue students into an array-based queue for BCS registration. Students have the option of taking five different cours

Syntax rules for writing constructor functions Its name must be similar as that of the class to which it belongs. It is declared with no return type (not even void). Ho