leap.h:
#if !defined(LEAP_H)
#define LEAP_H
namespace leap
{
extern bool is_leap_year(int year);
}
#endif
leap.cpp:
#include "leap.h"
namespace leap
{
extern bool is_leap_year(int year)
{
return (year % 100) ? (year % 4 == 0) : (year % 400 == 0);
}
}
VAX won't let me move the implementation from the .cpp file to the .h file.