I understand the syntax of inheritance in C++:
class DerivedClassName : public BaseClassName {}
However, in a program I found a string like that:
class ComplexNumberTest : public CppUnit::TestCase {
and I do not understand what it means. It is clear that ComplexNumberTest is subclass of CppUnit but what TestCase does their?
I think that CppUnit::TestCase means TestCase method of CppUnit class but then DerivedClassName should be a subclass of a method?
Could anybody please help me with that?
CppUnit is namespace, ComplexNumberTest is a derived class of TestCase from CppUnit namespace.
In your code, you have TestCase in this way:
Or it TestCase could be a nested class(type) inside CppUnit with public access(thanks to PeterWood)