Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

//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


Please Help Members By Posting Answers For Below Questions

What are the 5 oop principles?

1113


Why interface is used?

1005


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4731


Why do we use class?

1074


Is this job good for future? can do this job post grduate student?

2153


What makes a language oop?

1035


which feature are not hold visual basic of oop?

2184


Can we create object of abstract class?

1071


Plese get me a perfect C++ program for railway/airway reservation with all details.

3881


2. Give the different notations for the class.\

2144


What do you mean by variable?

1023


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.

1233


What is object in oop with example?

1216


What are the 4 main oop principles?

1217


What are main features of oop?

1113