ToD.h
/**************************************************
* A simple module for keeping track of the time of
* day using 12 or 24 hour clocks. The available
* documentation is inadequate, I want to keep the
* space down so it fits easily in the notes!
**************************************************/
#ifndef _TOD_
#define _TOD_
#include <fstream>
#include <string>
using namespace std;
// Class for storing times of day
class ToD
{
public:
int h, m;
bool AM;
};
// Func's: setting, writing and adding time
bool set12(ToD &T, int lh, int bh, string ampm);
bool set24(ToD &T, int lh, int bh);
void print12(ToD T, ostream&);
void print24(ToD T, ostream&);
void addmints(ToD &T, int m);
void addhours(ToD &T, int h);
#endif