/*----d.h---*/ class D { private: int num; public: D(int x) { this->num=x; printf(“Hello, this is %d\n”, x); } work() { printf(“This is %d working\n”, this->num); }; /*---a.cpp---*/ #include "d.h" int g1=0; D d1(1); /*---b.cpp--*/ #include "d.h" extern D d1; D d2(2); main() { int l2=0; D * d3=new D(3); d1.work(); d2.work(); d3->work(); }