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 |
What is the use of class in c++?
Should the member functions which are made public in the base class be hidden?
What is abstraction in c++?
When are exception objects created?
Explain the virtual inheritance in c++.
why we cant create array of refrences
What is Namespace?
int main() { int i ,a[i]; i = 0; a[i] = 10; cout<< a[i] << endl; return 0; } What will be output of this program?
What happens if a pointer is deleted twice?
How are virtual functions implemented in c++?
What is the difference between while and do while loop? Explain with examples.
Explain terminate() function?