void main(){ Person one; // use default constructor Person two("Smythecraft"); // use #2 with one default argument _ lname Person three("Dimwiddy", "Sam"); // use #2, no defaults _lname &fname one.Show(); cout << endl; one.FormalShow(); cout << endl; two.Show(); cout << endl; two.FormalShow(); cout << endl; three.Show(); cout << endl; three.FormalShow(); cout << endl; system("Pause"); }
int main(void) { Person one; Person two("Smythecraft"); Person three("Dimwiddy", "Sam"); one.Show(); one.FormalShow(); cout<<endl; two.Show(); two.FormalShow(); cout<<endl; three.Show(); three.FormalShow(); cout<<endl; return 0; }
int main() { Person a; Person b("Omar"); Person c("Magdy", "Maged"); a.Show(); cout << endl; a.FormalShow(); cout << endl << endl; b.Show(); cout << endl; b.FormalShow(); cout << endl << endl; c.Show(); cout << endl; c.FormalShow(); cout << endl << endl; system("pause"); return 0; }
int main() { Person one; Person two("Smythecraft"); // use #2 with one default argument Person three("Dimwiddy", "Sam"); // use #2, no defaults one.Show(); cout << endl; one.FormalShow(); cout << endl; two.Show(); cout << endl; two.FormalShow(); cout << endl; three.Show(); cout << endl; three.FormalShow(); cout << endl; system("pause"); return 0; }
virtual void Show() { m_component->Show(); }