Subj : Re: "File Scope" objects To : comp.programming,comp.software-eng From : Chris Sonnack Date : Fri Aug 26 2005 03:03 pm Phlip writes: >> You want to define class B in the implementation file of class A, i.e. >> "a.cpp". >> >> But suppose class B is written as normal, i.e. "b.h" and "b.cpp", but >> "b.h" is included only in "a.cpp". >> >> You won't be looking at "b.h" anyway except by way of finding an >> include in "a.cpp". So why worry about it? > > Because #include "b.h" is a compilable comment tempting your colleagues > "b.h" is designed to be reused. > > It is not. That would be an important criterion for me as would the SIZE of the class, b. If b had any size, or any potential for reuse, then I would go the b.h and b.cpp route. There is also the issue of "separation of concerns". The class b would need to be *intimately* coupled to class a to share a .cpp file. -- |_ CJSonnack _____________| How's my programming? | |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL | |_____________________________________________|_______________________| .