I know that the naming convention for an interface is something like IName
. But what if I am creating an abstract class?
Should I also write an I in front of the class name?
As opposed to Oracles Java coding conventions, there is no "The" naming convention for C++.
If you are working on a project for some company you should follow their naming conventions. If there are no documented conventions - look around the code base and try to follow the swarm, consistency is the key.
If you are starting something on your own, many find google's c++ coding conventions as a good start.
If you are trying to adhere to a specific naming convention, please name it. As the other answer explains, there is no global "C++ Rule" regarding naming conventions.
If you are using Hungarian notation, I believe that the convention is indeed to prefix 'I' as you did for 'IName'.
Note: Whilst there is no "interface" as such in C++, you can define classes with only pure virtual methods and no member variables.
There is no such thing as a global naming convention. At the time you know by what naming convention, you can look up the answer in it.
I
prefix is a Microsoftism (for COM and .NET), not a C++ naming convention per se.