fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <memory>
  5.  
  6. struct BinaryNode {
  7. int val;
  8. BinaryNode *leftchild, *rightchild;
  9. };
  10.  
  11. struct NaryNode {
  12. int val;
  13. std::vector<NaryNode*> children;
  14. };
  15.  
  16. int main()
  17. {
  18. std::unique_ptr<NaryNode> nnode1(new NaryNode{4});
  19. }
  20.  
Success #stdin #stdout 0s 2980KB
stdin
Standard input is empty
stdout
Standard output is empty