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 is overloading in oop?

965


What is the main purpose of inheritance law?

1158


What is the highest level of cohesion?

992


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

2160


When not to use object oriented programming?

1039


What is encapsulation process?

1011


Why is oop useful?

1048


Can we override main method?

1142


Why do we use polymorphism?

1024


What are the 3 principles of oop?

1068


What is variable example?

993


What is protected in oop?

1020


to find out the minimum of two integer number of two different classes using friend function

2091


what is difference between class template and template class?

2610


What is encapsulation in oops?

968