November 7th, 2012, 09:40 AM
code in dot H files
An engineer just left our project and now I am working on his project. In his dot H files there are several routines where he writes the executable code in the declaration rather than the dot C or dot CPP file. For a method with maybe one line of code I don't see a real problem with that. However he has multiple methods written like this, one of which is over 150 lines of code. (Not a comment in sight but that is a different topic.)
Is there a possible advantage in writing the code in the dot H file rather than the dot CPP file?
Seems to me its better to put all the code in one place.
Click Here to Expand Forum to Full Width