#ifndef LIB1H #define LIB1H #include using namespace std; namespace lib1 { extern int x; void f(); class date { int year; int month; int day; public: date() {cout << "lib1::date::date, x == " << x << "\n";} void print() const; }; //semicolon at end of class declaration } //no semicolon at end of namespace #endif