Sadaqat Jeelani

Sadaqat Jeelani

  • NA
  • 20
  • 14.9k

i cant find problem in my code

May 31 2016 8:34 AM
#include<iostream>
#include<string>
using namespace std;
template<class T>
class audition {
T Anchor, Artist, Panel;
public:
audition(T An, T Ar, T Pa) {
Anchor = An;
Artist = Ar;
Panel = Pa;
}
T GetValues();
T Display();
};
template<class T>
T audition<T>::GetValues() {
cout << "Enter Anchor :";
cin >> Anchor;
cout << "Enter Artist :";
cin >> Artist;
cout << "Enter Panel:";
cin >> Panel;
}
template<class T>
T audition<T>::Display() {
cout << "Anchot :" << Anchor << endl;
cout << "Artist :" << Artist << endl;
cout << "Panel :";
}
int main() {
audition <string> myAudition("","","");
myAudition.GetValues();
myAudition.Display();
system("Pause");
}

Answers (2)