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_22426799_4471.cpp: In function 'IntList* newList(int)':
0_0_22426799_4471.cpp:15:46: error: invalid conversion from 'void*' to 'listptr {aka IntList*}' [-fpermissive]
     listptr p = malloc(sizeof(struct IntList));
                                              ^
0_0_22426799_4471.cpp:18:45: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
     p->array = malloc(capacity * sizeof(int));
                                             ^
0_0_22426799_4471.cpp: In function 'void addInt(int, listptr)':
0_0_22426799_4471.cpp:27:70: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
         int *newArray = realloc(p->array, (sizeof(int)) * p->capacity);
                                                                      ^


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-12-02 12:05:39, Gzip enabled