//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();
}



//what is wrong with the programme?? #include<iostream.h> template <class first> clas..

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

Post New Answer

More OOPS Interview Questions

What is for loop and its syntax?

0 Answers  


Which is better struts or spring?

0 Answers  


what is the sylabus for priliminaries?

0 Answers  


program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number

1 Answers   Anna University,


any one please tell me the purpose of operator overloading

0 Answers   Amazon,






What do you mean by binding of data and functions?

3 Answers  


Tell me the scenario,Where we can use interfaces or Abstract class.And What is the difference between interfaces and abstract class?

5 Answers  


Why multiple inheritance is not allowed?

0 Answers  


which is platform independent device used in computers

2 Answers  


What does it mean when someone says I oop?

0 Answers  


different types of castings

3 Answers   Siemens,


Why is static class not inherited?

0 Answers  


Categories