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 parameter does the constructor to an ofstream object take?
What is a mutex and a critical section.Whats difference between them?How do each of them work?
Why do we use setw in c++?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
What is the basic structure of a c++ program?
Carry out conversion of one object of user-defined type to another?
What are the two types of comments?
Describe the advantages of operator overloading?
Can you pass an array to a function in c++?
Explain mutable storage class specifier.
Write any small program that will compile in "C" but not in "C++"?
Can you please explain the difference between using macro and inline functions?