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_26943895_16444.cpp: In constructor 'Treap<__key, __val>::node::node(__key)':
0_0_26943895_16444.cpp:8:52: error: there are no arguments to 'rand' that depend on a template parameter, so a declaration of 'rand' must be available [-fpermissive]
         node(__key key) : key(key), v(0), pri(rand()), l(NULL), r(NULL){}
                                                    ^
0_0_26943895_16444.cpp:8:52: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
0_0_26943895_16444.cpp:8:58: error: 'NULL' was not declared in this scope
         node(__key key) : key(key), v(0), pri(rand()), l(NULL), r(NULL){}
                                                          ^
0_0_26943895_16444.cpp: In member function 'void Treap<__key, __val>::split(Treap<__key, __val>::node*, __key, Treap<__key, __val>::node*&, Treap<__key, __val>::node*&)':
0_0_26943895_16444.cpp:13:26: error: 'NULL' was not declared in this scope
         if(!now){a = b = NULL;return;}
                          ^
0_0_26943895_16444.cpp: In constructor 'Treap<__key, __val>::Treap()':
0_0_26943895_16444.cpp:51:20: error: 'NULL' was not declared in this scope
     Treap() : head(NULL), s(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-30 02:41:05, Gzip enabled