#ifndef ZIPCODE_H #define ZIPCODE_H #include #include //for the strncpy function using namespace std; template class zipcode; template ostream& operator<<(ostream& ost, const zipcode& z); template //Instead of . N should be 5 or 9. class zipcode { char a[N+1]; //the numeric digits of the zipcode, plus terminating '\0' public: zipcode(const char *p) { strncpy(a, p, N); //Copy N characters. a[N] = '\0'; } friend ostream& operator<<(ostream& ost, const zipcode& z) { return ost << z.a; } }; #endif