Naming convention for an abstract class?

I know that the naming convention for an interface is similar to IName . But what if I create an abstract class?

Do I also have to write in front of the class name?

+6
source share
3 answers

Unlike Oracles Java codec coding conventions, there is no "The" naming convention for C ++.

  • If you are working on a project for a company, you must follow their naming conventions. If there are no documented conventions, inspect the code base and try to follow the swarm; consistency is the key.

  • If you start something on your own, many find google C ++ coding conventions as a good start.

+10
source

If you are trying to adhere to a specific naming convention, name it. As another answer explains, there is no global “C ++ rule” regarding naming conventions.

If you use Hungarian notation, I believe that the convention is really the prefix "I", as you did for "IName".

Note. Although there is no "interface" in C ++, you can only define classes with pure virtual methods and without member variables.

+5
source

There is no such thing as a global naming convention. At that time, when you know by what naming convention, you can find the answer in it.

+3
source

Source: https://habr.com/ru/post/944487/


All Articles