/in/foo.cc: In function 'int isInHash(long long int)':
/in/foo.cc:64:32: error: no matching function for call to '_nodeH::_nodeH(void*)'
p = (nodeH)malloc(sizeof(nodeH));
^
/in/foo.cc:6:16: note: candidate: _nodeH::_nodeH()
typedef struct _nodeH{
^~~~~~
/in/foo.cc:6:16: note: candidate expects 0 arguments, 1 provided
/in/foo.cc:6:16: note: candidate: constexpr _nodeH::_nodeH(const _nodeH&)
/in/foo.cc:6:16: note: no known conversion for argument 1 from 'void*' to 'const _nodeH&'
/in/foo.cc:6:16: note: candidate: constexpr _nodeH::_nodeH(_nodeH&&)
/in/foo.cc:6:16: note: no known conversion for argument 1 from 'void*' to '_nodeH&&'
/in/foo.cc:68:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/in/foo.cc: In function 'int isInHash(long long int)':
/in/foo.cc:69:5: error: redefinition of 'int isInHash(long long int)'
int isInHash(long long key){
^~~~~~~~
/in/foo.cc:62:5: note: 'int isInHash(long long int)' previously defined here
int isInHash(long long key){
^~~~~~~~
/in/foo.cc:70:30: error: conversion from 'nodeH* {aka _nodeH*}' to non-scalar type 'nodeH {aka _nodeH}' requested
nodeH p = hash[key % MAX_SIZE];
~~~~~~~~~~~~~~~~~~~^
/in/foo.cc:71:9: error: no match for 'operator!=' (operand types are 'nodeH {aka _nodeH}' and 'long int')
while(p != NULL){
^
/in/foo.cc:72:5: error: base operand of '->' has non-pointer type 'nodeH {aka _nodeH}'
if(p->key == key)
^~
/in/foo.cc:74:6: error: base operand of '->' has non-pointer type 'nodeH {aka _nodeH}'
p = p->next;
^~