P
Peter Oliphant
I know that 'stdafx.h' has to do with pre-compiled headers. However, it seem
weird that it is a required 'include' in any CPP file, especially since the
file itself has no code in it!
I know that 'stdafx.h' is a good place to put "include files that are used
frequently, but are changed infrequently" .
But why does this file HAVE to be included when it contains nothing?
Just curious about this. I just include it like always and therefore this
has not caused any problems... : )
However, its my personal style to put all class code IN the header, thereby
making all such class code in-line. Of course, there are times this can't be
done, like when two classes need to reference each other's methods or
members (i.e., other than just a pointer to an instance of, say, 'myClass',
which can be satisfied via the 'class myClass;' statement just to let the
compiler know that 'myClass' is, indeed, a class that can be pointed to).
[==P==]
weird that it is a required 'include' in any CPP file, especially since the
file itself has no code in it!
I know that 'stdafx.h' is a good place to put "include files that are used
frequently, but are changed infrequently" .
But why does this file HAVE to be included when it contains nothing?
Just curious about this. I just include it like always and therefore this
has not caused any problems... : )
However, its my personal style to put all class code IN the header, thereby
making all such class code in-line. Of course, there are times this can't be
done, like when two classes need to reference each other's methods or
members (i.e., other than just a pointer to an instance of, say, 'myClass',
which can be satisfied via the 'class myClass;' statement just to let the
compiler know that 'myClass' is, indeed, a class that can be pointed to).
[==P==]