C++有关与继承的特性 求解答

新手初学 实在不知道哪里出错了
#ifndef TABTENNO_H_
#define TABTENN0_H_
#include
using std::string;
class TableTennisplayer
{
private:
string firstname;
string lastname;
bool hasTable;
public:
TableTennisplayer(const string & fn = "none",
const string & ln = "none", bool ht = false);
void Name()const;
bool HasTable()const { return hasTable; };
void ResetTable(bool v) { hasTable = v; };
};
class Ratedplayer :public TableTennisplayer
{
private:
unsigned int rating;
public:
Ratedplayer(unsigned int r = 0, const string & fn = "none",
const string & ln = "none", bool ht = false);
Ratedplayer(unsigned int r, const TableTennisplayer & tp);
unsigned int Rating()const { return rating; }
void ResetRating(unsigned int r) { rating = r; }
};
#endif // !TABTENNO_H_

#include"tabtennO.h"
#include
TableTennisplayer::TableTennisplayer(const string & fn,
const string & ln, bool ht) :firstname(fn),
lastname(ln), hasTable(ht) {}
void TableTennisplayer::Name()const
{
std::cout << lastname << ", " << firstname;
}
Ratedplayer::Ratedplayer(unsigned int r, const string & fn,
const string & ln, bool ht):TableTennisplayer(fn, ln, ht)
{
rating = r;
}
Ratedplayer::Ratedplayer(unsigned int r,const TableTennisplayer & tp)
:TableTennisplayer(tp), rating(r)
{

}
![图片说明](https://img-ask.csdn.net/upload/201703/08/1488988256_399330.png)图片说明

图片说明

这一行的(括号是全角的,应该修改为半角

1.不要在子类构造函数运行时调用基类构造函数,因为子类构造函数调用时就会先调用基类构造函数, 2.函数的参数只能在函数内部使用。

你看那个提示就知道了,把 " tabletenisplayer(fn " 当成一个类型了。

你的firstname是const,然后你还引用传…