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_37580018_7682.cpp: In constructor 'SegmentTree<Info, Merge>::SegmentTree(std::vector<_RealType>)':
0_0_37580018_7682.cpp:17:9: error: 'function' was not declared in this scope
         function<void(int, int, int)> build = [&](int u, int l, int r) {
         ^
0_0_37580018_7682.cpp:17:18: error: expected primary-expression before 'void'
         function<void(int, int, int)> build = [&](int u, int l, int r) {
                  ^
0_0_37580018_7682.cpp:26:22: error: there are no arguments to 'build' that depend on a template parameter, so a declaration of 'build' must be available [-fpermissive]
         build(1, 1, n);
                      ^
0_0_37580018_7682.cpp:26:22: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
0_0_37580018_7682.cpp: In instantiation of 'SegmentTree<Info, Merge>::SegmentTree(std::vector<_RealType>) [with Info = Info; Merge = std::plus<Info>]':
0_0_37580018_7682.cpp:107:35:   required from here
0_0_37580018_7682.cpp:26:22: error: 'build' was not declared in this scope


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-23 09:52:22, Gzip enabled