foo.c: In function 'addToHash':
foo.c:66:1: error: conversion to non-scalar type requested
p = (nodeH)malloc(sizeof(nodeH));
^
foo.c:67:2: error: invalid type argument of '->' (have 'nodeH {aka struct _nodeH}')
p->key = key;
^~
foo.c:68:2: error: invalid type argument of '->' (have 'nodeH {aka struct _nodeH}')
p->next = hash[key % MAX_SIZE];
^~
foo.c:69:22: error: incompatible types when assigning to type 'nodeH * {aka struct _nodeH *}' from type 'nodeH {aka struct _nodeH}'
hash[key % MAX_SIZE] = p;
^
foo.c: In function 'isInHash':
foo.c:72:11: error: invalid initializer
nodeH p = hash[key % MAX_SIZE];
^~~~
foo.c:73:9: error: invalid operands to binary != (have 'nodeH {aka struct _nodeH}' and 'void *')
while(p != NULL){
^~
foo.c:74:5: error: invalid type argument of '->' (have 'nodeH {aka struct _nodeH}')
if(p->key == key)
^~
foo.c:76:6: error: invalid type argument of '->' (have 'nodeH {aka struct _nodeH}')
p = p->next;
^~
foo.c: In function 'addToQueue':
foo.c:85:1: error: conversion to non-scalar type requested
tail->next = (nodeQ)malloc(sizeof(nodeQ));
^~~~
foo.c: In function 'main':
foo.c:38:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", line);
^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务