/* * player.hpp * * Created on: Sep 7, 2011 * Author: Michael Fischer */ #pragma once #include #include #include "player.hpp" #include "tools.hpp" using namespace std; class Player { private: string name; // Name double avg; // Batting average int year; // Year to which avg applies public: Player() {} // read function will store data in this object ~Player() {} // no dynamic allocation; nothing to do bool operator<=(const Player& p2) const; istream& read(istream& in); ostream& print(ostream& out) const; }; inline istream& operator>>(istream& in, Player& pl) { pl.read(in); return in; } inline ostream& operator<<(ostream& out, const Player& pl) { return pl.print(out); }