What are the advantages and disadvantages of implementing classes in header files?

后端 未结 6 1224
北荒
北荒 2020-12-03 11:49

I love the concept of DRY (don\'t repeat yourself [oops]), yet C++\'s concept of header files goes against this rule of programming. Is there any drawback to defining a clas

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 12:17

    Well - one problem is that typically implementations change much more often than class definitions - so for a large project you end up having to recompile the world for every small change.

提交回复
热议问题