F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_37485966_10808.cpp:14:22: error: 'std::unique_ptr' has not been declared
  void InitChild(std::unique_ptr<Tree>& tree) 
                      ^
0_0_37485966_10808.cpp:14:32: error: expected ',' or '...' before '<' token
  void InitChild(std::unique_ptr<Tree>& tree) 
                                ^
0_0_37485966_10808.cpp:59:7: error: 'unique_ptr' in namespace 'std' does not name a template type
  std::unique_ptr<Tree> left_;
       ^
0_0_37485966_10808.cpp:60:7: error: 'unique_ptr' in namespace 'std' does not name a template type
  std::unique_ptr<Tree> right_;
       ^
0_0_37485966_10808.cpp: In member function 'void Tree::InitChild(int)':
0_0_37485966_10808.cpp:16:7: error: 'tree' was not declared in this scope
   if (tree)
       ^
0_0_37485966_10808.cpp:20:3: error: 'tree' was not declared in this scope
   tree = std::make_unique<Tree>();
   ^
0_0_37485966_10808.cpp:20:10: error: 'make_unique' is not a member of 'std'
   tree = std::make_unique<Tree>();
          ^
0_0_37485966_10808.cpp:20:31: error: expected primary-expression before '>' token
   tree = std::make_unique<Tree>();
                               ^
0_0_37485966_10808.cpp:20:33: error: expected primary-expression before ')' token
   tree = std::make_unique<Tree>();
                                 ^
0_0_37485966_10808.cpp: In member function 'void Tree::AddNode(long long int)':
0_0_37485966_10808.cpp:32:14: error: 'left_' was not declared in this scope
    InitChild(left_);
              ^
0_0_37485966_10808.cpp:37:14: error: 'right_' was not declared in this scope
    InitChild(right_);
              ^
0_0_37485966_10808.cpp: In member function 'void Tree::Print()':
0_0_37485966_10808.cpp:48:7: error: 'left_' was not declared in this scope
   if (left_) 
       ^
0_0_37485966_10808.cpp:52:7: error: 'right_' was not declared in this scope
   if (right_) 
       ^
0_0_37485966_10808.cpp: In function 'int main()':
0_0_37485966_10808.cpp:72:3: error: 'shared_ptr' is not a member of 'std'
   std::shared_ptr<Tree> my_tree = std::make_shared<Tree>();
   ^
0_0_37485966_10808.cpp:72:23: error: expected primary-expression before '>' token
   std::shared_ptr<Tree> my_tree = std::make_shared<Tree>();
                       ^
0_0_37485966_10808.cpp:72:25: error: 'my_tree' was not declared in this scope
   std::shared_ptr<Tree> my_tree = std::make_shared<Tree>();
                         ^
0_0_37485966_10808.cpp:72:35: error: 'make_shared' is not a member of 'std'
   std::shared_ptr<Tree> my_tree = std::make_shared<Tree>();
                                   ^
0_0_37485966_10808.cpp:72:56: error: expected primary-expression before '>' token
   std::shared_ptr<Tree> my_tree = std::make_shared<Tree>();
                                                        ^
0_0_37485966_10808.cpp:72:58: error: expected primary-expression before ')' token
   std::shared_ptr<Tree> my_tree = std::make_shared<Tree>();
                                                          ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-29 20:07:26, Gzip enabled