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 c++ and its uses?
Write about the scope resolution operator?
string somestring ; Which of the following choices will convert a standard C++ string object "somestring" to a C string? a) Copy.somestring () ; b) somestring.c_str () c) &somestring [1] d) std::cstring (somestring) e) (char *) somestring
What is the Difference between "printf" and "sprintf"?
7 Answers iSoft, PentaWare, TCS,
Can we declare a base-class destructor as virtual?
What are references in c++?
How do I start a c++ project?
Given a simple program designed to take inputs of integers from 1-1000 and to output the factorial value of that number, how would you test this program? You do not have access to the code. Please be as specific as possible.
can output 5 students using one dimensional array
What is the this pointer?
Which of the Standard C++ casts can be used to perform a ?safe? downcast: a) reinterpret_cast b) dynamic_cast c) static_cast d) const_cast
Explain about vectors in c ++?