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_39259004_21665.cpp: In function 'int main()':
0_0_39259004_21665.cpp:56:10: error: 'function' is not a member of 'std'
   56 |     std::function<void(int,int)> dfs = [&](int u, int f) -> void {
      |          ^~~~~~~~
0_0_39259004_21665.cpp:5:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
    4 | #include <array>
  +++ |+#include <functional>
    5 | 
0_0_39259004_21665.cpp:56:31: error: expression list treated as compound expression in functional cast [-fpermissive]
   56 |     std::function<void(int,int)> dfs = [&](int u, int f) -> void {
      |                               ^
0_0_39259004_21665.cpp:56:19: error: expected primary-expression before 'void'
   56 |     std::function<void(int,int)> dfs = [&](int u, int f) -> void {
      |                   ^~~~
0_0_39259004_21665.cpp:70:9: error: 'dfs' was not declared in this scope
   70 |         dfs(Stk[i][1], -1);
      |         ^~~


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-25 16:22:48, Gzip enabled