/in/foo.cc:176:5: error: 'time' does not name a type
     time T;
     ^~~~
/in/foo.cc: In constructor 'datetime::datetime(int, int, int, int, int, int)':
/in/foo.cc:178:62: error: class 'datetime' does not have any field named 'T'
     datetime(int y,int m,int d,int h,int min,int s):D(y,m,d),T(h,min,s){}
                                                              ^
/in/foo.cc: In member function 'void datetime::secadd(int)':
/in/foo.cc:181:17: error: 'T' was not declared in this scope
         int day=T.add(x);
                 ^
/in/foo.cc: In member function 'void datetime::output()':
/in/foo.cc:187:9: error: 'T' was not declared in this scope
         T.output();
         ^