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_39052080_13951.cpp: In function 'int main()':
0_0_39052080_13951.cpp:15:9: error: 'function' was not declared in this scope
   15 |         function<void(int, int)> dfs;
      |         ^~~~~~~~
0_0_39052080_13951.cpp:4:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
    3 | #include<bitset>
  +++ |+#include <functional>
    4 | 
0_0_39052080_13951.cpp:15:31: error: expression list treated as compound expression in functional cast [-fpermissive]
   15 |         function<void(int, int)> dfs;
      |                               ^
0_0_39052080_13951.cpp:15:18: error: expected primary-expression before 'void'
   15 |         function<void(int, int)> dfs;
      |                  ^~~~
0_0_39052080_13951.cpp:16:9: error: 'dfs' was not declared in this scope
   16 |         dfs = [&](int x, int y){
      |         ^~~


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-06-28 08:14:08, Gzip enabled