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

13 lines
335 B
C++
Raw Permalink Normal View History

2022-12-20 17:31:11 +08:00
//tabtenn0.cpp -- simple base-class methods
#include "tabtenn0.h"
#include <iostream>
TableTennisPlayer::TableTennisPlayer (const string & fn,
const string & ln, bool ht) : firstname(fn),
lastname(ln), hasTable(ht) {}
void TableTennisPlayer::Name() const
{
std::cout << lastname << ", " << firstname;
}