Why defining private members below public members in C++? -


Sometimes class members are declared publicly and privately in class definition. But variables or data members are usually used by private and public methods. Therefore, variables are used in this case but have not yet been announced. Thus it becomes difficult to understand the code. But I later found renowned programmers, sites or books to declare private members. Does anyone know what is the reason?

Concerned about private members, they are interested in public APIs (i.e. the use of my class How to do).

In addition, in header files, I'm usually declaring member functions only, instead of defining them, so I'm not accessing any personal members.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -