//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 |
What is for loop and its syntax?
Which is better struts or spring?
what is the sylabus for priliminaries?
program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number
any one please tell me the purpose of operator overloading
What do you mean by binding of data and functions?
Tell me the scenario,Where we can use interfaces or Abstract class.And What is the difference between interfaces and abstract class?
Why multiple inheritance is not allowed?
which is platform independent device used in computers
What does it mean when someone says I oop?
different types of castings
Why is static class not inherited?