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_37364074_21987.cpp: In function 'HeapStruct* PQ_Initialize(long long int)':
0_0_37364074_21987.cpp:27:55: error: invalid conversion from 'void*' to 'PriorityQueue {aka HeapStruct*}' [-fpermissive]
     PriorityQueue H = malloc(sizeof(struct HeapStruct));
                                                       ^
0_0_37364074_21987.cpp:28:59: error: invalid conversion from 'void*' to 'ElementType* {aka long long int*}' [-fpermissive]
     H->Elements = malloc(sizeof(ElementType) * MaxElements);
                                                           ^
0_0_37364074_21987.cpp:29:51: error: invalid conversion from 'void*' to 'long long int*' [-fpermissive]
     H->Position = malloc(sizeof(int) * MaxElements);
                                                   ^
0_0_37364074_21987.cpp: In function 'GNode* G_Initialize(long long int, long long int)':
0_0_37364074_21987.cpp:102:32: error: invalid conversion from 'void*' to 'Graph {aka GNode*}' [-fpermissive]
  Graph G = malloc(sizeof(Graph));
                                ^
0_0_37364074_21987.cpp:105:52: error: invalid conversion from 'void*' to 'AdjList {aka Vnode*}' [-fpermissive]
     G->List = malloc(sizeof(struct Vnode) * (M + 1));
                                                    ^
0_0_37364074_21987.cpp: In function 'void Add_Edge(Graph, Vertex, Vertex, Weight)':
0_0_37364074_21987.cpp:111:53: error: invalid conversion from 'void*' to 'PtrToAdjVNode {aka AdjVNode*}' [-fpermissive]
     PtrToAdjVNode E = malloc(sizeof(struct AdjVNode));
                                                     ^


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-11 14:10:24, Gzip enabled