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_39670118_10252.cpp: In function 'int countSolutions(int)':
0_0_39670118_10252.cpp:11:5: error: 'function' was not declared in this scope
   11 |     function<void(int, int, int, int)> solve = [&](int row, int columns, int diagonals1, int diagonals2) {
      |     ^~~~~~~~
0_0_39670118_10252.cpp:2:1: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
    1 | #include <iostream>
  +++ |+#include <functional>
    2 | using namespace std;
0_0_39670118_10252.cpp:11:37: error: expression list treated as compound expression in functional cast [-fpermissive]
   11 |     function<void(int, int, int, int)> solve = [&](int row, int columns, int diagonals1, int diagonals2) {
      |                                     ^
0_0_39670118_10252.cpp:11:14: error: expected primary-expression before 'void'
   11 |     function<void(int, int, int, int)> solve = [&](int row, int columns, int diagonals1, int diagonals2) {
      |              ^~~~
0_0_39670118_10252.cpp:25:5: error: 'solve' was not declared in this scope
   25 |     solve(0, 0, 0, 0);
      |     ^~~~~


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-24 20:58:32, Gzip enabled