What are templates? where we should use it?
Answers were Sorted based on User's Feedback
Answer / prabhatkr09
Template allow us to write one function and class that works for different datatype .
Use :
Create a type safe collection class that can operate on data of any type.
add extra type checking for function.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / satheeshkumar
Template allow us to write one function and class that
works for different datatype .
Use :
Create a type safe collection class that can operate on
data of any type.
add extra type checking for function.
| Is This Answer Correct ? | 1 Yes | 0 No |
Generally variables are stored in heap memory. When he variables are created in stack?
How do you write a function that can reverse a linked-list?
Explain how a pointer to function can be declared in C++?
What is a mutex and a critical section.Whats difference between them?How do each of them work?
What is the this pointer?
How can I learn c++ easily?
Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);
What are separators in c++?
Mention the purpose of istream class?
What is #include cstdlib in c++?
What is a static member?
What are the differences between new and malloc?