In the example below, the second and third public: would be grayed out because they follow the first public: without any other specifiers in between. So in effect you can remove them to improve readability without changing the meaning of your program.

classPerson{public:intage;public://Access specifier does not change accessibility levelstringname;public://Access specifier does not change accessibility levelintgender;}

Note that even the first access specifier could be redundant if there is the same access specifier in a macro expansion that precedes it.