fork download
  1. class RBNode
  2. {
  3. public:
  4. char color;
  5. public:
  6. RBNode();
  7. };
  8.  
  9. class RBTree
  10. {
  11. private:
  12. static RBNode* Tnil;
  13. };
  14.  
  15. RBNode::RBNode()
  16. {
  17. Tnil->color = 'B';
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In constructor ‘RBNode::RBNode()’:
prog.cpp:17:5: error: ‘Tnil’ was not declared in this scope
     Tnil->color = 'B';
     ^~~~
stdout
Standard output is empty