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_38778875_31726.cpp: In function 'void solve()':
0_0_38778875_31726.cpp:34:10: error: 'function' is not a member of 'std'
   34 |     std::function<void(int, int)> getsize = [&] (int x, int p) {
      |          ^~~~~~~~
0_0_38778875_31726.cpp:9:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
    8 | #include <queue>
  +++ |+#include <functional>
    9 | 
0_0_38778875_31726.cpp:34:32: error: expression list treated as compound expression in functional cast [-fpermissive]
   34 |     std::function<void(int, int)> getsize = [&] (int x, int p) {
      |                                ^
0_0_38778875_31726.cpp:34:19: error: expected primary-expression before 'void'
   34 |     std::function<void(int, int)> getsize = [&] (int x, int p) {
      |                   ^~~~
0_0_38778875_31726.cpp:45:10: error: 'function' is not a member of 'std'
   45 |     std::function<void(int, int)> getroot = [&] (int x, int p) {
      |          ^~~~~~~~
0_0_38778875_31726.cpp:45:10: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
0_0_38778875_31726.cpp:45:32: error: expression list treated as compound expression in functional cast [-fpermissive]
   45 |     std::function<void(int, int)> getroot = [&] (int x, int p) {
      |                                ^
0_0_38778875_31726.cpp:45:19: error: expected primary-expression before 'void'
   45 |     std::function<void(int, int)> getroot = [&] (int x, int p) {
      |                   ^~~~
0_0_38778875_31726.cpp:63:10: error: 'function' is not a member of 'std'
   63 |     std::function<void(int, int, int)> occupy = [&] (int x, int p, int top) {
      |          ^~~~~~~~
0_0_38778875_31726.cpp:63:10: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
0_0_38778875_31726.cpp:63:37: error: expression list treated as compound expression in functional cast [-fpermissive]
   63 |     std::function<void(int, int, int)> occupy = [&] (int x, int p, int top) {
      |                                     ^
0_0_38778875_31726.cpp:63:19: error: expected primary-expression before 'void'
   63 |     std::function<void(int, int, int)> occupy = [&] (int x, int p, int top) {
      |                   ^~~~
0_0_38778875_31726.cpp:77:10: error: 'function' is not a member of 'std'
   77 |     std::function<void(int)> solve = [&] (int p) {
      |          ^~~~~~~~
0_0_38778875_31726.cpp:77:10: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
0_0_38778875_31726.cpp:77:19: error: expected primary-expression before 'void'
   77 |     std::function<void(int)> solve = [&] (int p) {
      |                   ^~~~
0_0_38778875_31726.cpp:95:5: error: 'getsize' was not declared in this scope
   95 |     getsize(0, -1);
      |     ^~~~~~~
0_0_38778875_31726.cpp:96:5: error: 'getroot' was not declared in this scope; did you mean 'root'?
   96 |     getroot(0, -1);
      |     ^~~~~~~
      |     root
0_0_38778875_31726.cpp:98:10: error: too many arguments to function 'void solve()'
   98 |     solve(root);
      |     ~~~~~^~~~~~
0_0_38778875_31726.cpp:13:6: note: declared here
   13 | void solve() {
      |      ^~~~~


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-16 19:49:57, Gzip enabled