C++ Vector,Generic function,Templates,size_t
- sondip poul singh
- Apr 1, 2019
- 1 min read
https://www.tutorialspoint.com/cplusplus/cpp_templates.htm
A template is a blueprint or formula for creating a generic class or a function. It involves writing code in a way that is independent of any particular type.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>.
size_t is unsinged int which means it can take 2^64 values.Instead of using long int sometimes we use it.(not exactly sure)
Comments