Answer Posted / ravinandan
Template is used for generic programming. In other words
when you want to write a function or a class type
independent, go for templates.
template<class T>
void fun(T x, T y); // Is a Template function
template<typename T>
class abc{
T m;
}; // Is a Class Template
template<class T>
class abc{
T m;
}; // Is a Class Template
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is polymorphism and why is it important?
can inline function declare in private part of class?
What causes polymorphism?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
What is variable example?
Why is oop useful?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What is inheritance write a program to show use of inheritance?
What is a class in oop?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What is overriding in oop?
Why it is called runtime polymorphism?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is difference between abstraction and encapsulation?