adsense


Thursday, 26 November 2015

C++ LANGUAGE FUNCTION OF GENERIC

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button



C++ LANGUAGE FUNCTION OF GENERIC




FUNCTION OF GENERIC 

Templates are the foundation of generic programming, 
which involves writing code in a way that is independent 
of any particular type. 

A template is a blueprint or formula for creating a generic 
class or a function. The library containers like iterators 
and algorithms are examples of generic programming and have 
been developed using template concept. 

There is a single definition of each container, such as vector, 
but we can define many different kinds of vectors for example, 
vector <int> or vector <string>. 

You can use templates to define functions as well as classes, 
let us see how  they work: 


No comments: