The class name is ‘audition’. Write a program with a function template named ‘get’ and another function template named ‘display’. The arguments for the function template should be, ‘anchor’, ‘artists’, ‘panel’. Your task is to activate the functionality of both the function templates defined above. The ‘get’ function should get the values for anchor, artists and panel from the user. And ‘display’ should display them.
Code
enter code here #include
#include
using namespace std;
template
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
T audition::GetValues() {
cout << "Enter Anchor :";
cin >> Anchor;
cout << "Enter Artist :";
cin >> Artist;
cout << "Enter Panel:";
cin >> Panel;
return 0;
}
template
T audition::Display() {
cout << "Anchor :" << Anchor << endl;
cout << "Artist :" << Artist << endl;
cout << "Panel :" << Panel <
return 0;
}
int main() {
audition myAudition("","","");
myAudition.GetValues();
myAudition.Display();
system("Pause");
}
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted May 31, 2016, 9:39 AM EDT
Farhan ShariffRank #2,004 · 725 reputationPosted Jun 2, 2016, 12:03 PM EDT
std::stringconstructor with the NULL.