Coding Standards / Coding Best practices in C++

前端 未结 17 1781
醉话见心
醉话见心 2021-01-02 09:06

Consider the two code segments below. Which one is better and Why? If you have any other idea, please do mention. Where can I find answers to coding p

17条回答
  •  佛祖请我去吃肉
    2021-01-02 09:37

    Personally I prefer sample 2. It groups those items that will not result in the report being generated together.

    As far as general coding guidelines, the book Code Complete (Amazon) is a good reference for coding style issues.

提交回复
热议问题