Victor Bazarov wrote:
> E. Robert Tisdale wrote:
>
>>[...]
>>You should *always* include the [module] interface (header file)
>>int the [module] implementation file
>>so that the compiler can check for any inconsistency.
>
> What inconsistency will the compiler be able to recognize
> in a situation like this
>
> #ifndef BLAH // This part
> #define BLAH // is included
> // from a header
> int foo(int); // file when
> // we use the
> #endif // #include
>
> int foo(double a) {
> return 42;
> }
>
> ? There is no connection between the 'foo' declared above and
> 'foo' defined in the translation unit.
So what's your point?
Certainly, it would be nice if your compiler could read your mind
but I can't.