fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. class IName{
  6. public:
  7. virtual string GetName() const = 0;
  8. };
  9.  
  10. class ITaskName{
  11. public:
  12. virtual string GetName() const = 0;
  13. };
  14.  
  15. class CName: virtual public IName{
  16. public:
  17. virtual string GetName() const { return m_name; }
  18. private:
  19. string m_name;
  20. };
  21.  
  22. class CTask: virtual public CName, virtual public ITaskName
  23. {
  24. public:
  25. using CName::GetName;
  26. };
  27.  
  28.  
  29.  
  30. int main() {
  31. return 0;
  32. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty