fork download
  1. #include <iostream>
  2. #include <regex>
  3. #include <string>
  4. using namespace std;
  5.  
  6. class A1 {
  7. protected:
  8. regex someValue;
  9.  
  10. public:
  11. A1(){};
  12. A1(const string & value_A ): someValue(value_A){};
  13. };
  14.  
  15. class B2 : public A1 {
  16.  
  17. public:
  18. B2(const char * value_B): A1(value_B){};
  19. };
  20.  
  21. int main()
  22. {
  23.  
  24. B2 object1 = B2("something1");
  25. B2 object2 = B2("something2");
  26. object1 = object2;
  27. }
  28.  
Success #stdin #stdout 0s 3344KB
stdin
Standard input is empty
stdout
Standard output is empty