Why don't people indent C++ access specifiers/case statements?

前端 未结 10 1593
悲哀的现实
悲哀的现实 2020-12-16 11:13

I often see stuff like this:

class SomeClass {
public:
    void someMethod();
private:
    int someMember;
};

This seems totally unnatural

10条回答
  •  囚心锁ツ
    2020-12-16 11:45

    Two possible reasons:

    • that's how Bjarne Stroustrup indents them in his books

    • most text editors indent them that way automatically

提交回复
热议问题