PracticeDev/study_cpp/cpp_primer_source_code/Chapter 13/usett0.cpp

23 lines
557 B
C++

// usett0.cpp -- using a base class
#include <iostream>
#include "tabtenn0.h"
int main ( void )
{
using std::cout;
TableTennisPlayer player1("Chuck", "Blizzard", true);
TableTennisPlayer player2("Tara", "Boomdea", false);
player1.Name();
if (player1.HasTable())
cout << ": has a table.\n";
else
cout << ": hasn't a table.\n";
player2.Name();
if (player2.HasTable())
cout << ": has a table";
else
cout << ": hasn't a table.\n";
// std::cin.get();
return 0;
}