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_39756106_24333.cpp: In function 'int main()':
0_0_39756106_24333.cpp:60:31: error: 'realloc' was not declared in this scope
   60 |             graph[a] = (Edge*)realloc(graph[a], (graphSize[a] + 1) * sizeof(Edge));
      |                               ^~~~~~~
0_0_39756106_24333.cpp:4:1: note: 'realloc' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
    3 | #include <limits.h>
  +++ |+#include <cstdlib>
    4 | 
0_0_39756106_24333.cpp:78:13: error: 'free' was not declared in this scope
   78 |             free(graph[i]);
      |             ^~~~
0_0_39756106_24333.cpp:78:13: note: 'free' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-10 21:43:32, Gzip enabled