//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 Posted / 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 View All Answers
What are the 5 oop principles?
Why interface is used?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
Why do we use class?
Is this job good for future? can do this job post grduate student?
What makes a language oop?
which feature are not hold visual basic of oop?
Can we create object of abstract class?
Plese get me a perfect C++ program for railway/airway reservation with all details.
2. Give the different notations for the class.\
What do you mean by variable?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
What is object in oop with example?
What are the 4 main oop principles?
What are main features of oop?