what is the use of template classes in c++
Answer / ags
Templates are used to avoid the repetition of similar
functions in any class.
Is This Answer Correct ? | 6 Yes | 0 No |
What is polymorphism ? Explain with examples
what is the sylabus for priliminaries?
what is the need of abstraction? what is abstraction?what is the abstraction for stack?
suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?
What are objects in oop?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
Why a "operator=(...)" when there is a copy ctor?
What is Dynamic Polymorphism?
What are the benefits of polymorphism?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; a.x = 22; int c = a.x; int *b = new int; cout << c; return 0; } option: No output 0 22 -(11) Will not compile
What are the benefits of oop?
Plese get me a perfect C++ program for railway/airway reservation with all details.