//what is wrong with the programme??
#include<iostream.h>
template <class first>
class dd
{
first i;
public:
void set();
void print();
};
void dd< first>:: set()
{
cin>>i;
}
void dd< first>::print()
{
cout<<"\n"<<i;
}
void main()
{
dd <char>g;
g.set();
g.print();
}
Answer / prakash
template<class first> void dd<first>::set()
{
cin>>i;
}
template<class first> void dd<first>::print()
{
cout<<"\n"<<i;
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Which language is not a true object oriented programming language?
How do you make derived class as an abstract class?
In multiple inheritance , to create sub class object , is there need to create objects for its superclasses??? in java and c++ both. Actually i have some information that is , all available members from its superclasses , memory created in subclass obj , so no need to create object for its superclasses...??? Thanks in Advance
why the argument is passed by reference to a copy constructor?example?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What is data binding in oops?
What is command routing in MFC
What is multilevel inheritance?
What are two types of polymorphism?
why reinterpret cast is considered dangerous?
what is a class
how does a main() in C++ is different from main() in C?