/ Vijos /

记录详情

Compile Error

/in/foo.c: In function 'addToHash':
/in/foo.c:58:2: error: 'p' is a pointer; did you mean to use '->'?
 p.key = key;
  ^
  ->
/in/foo.c:59:2: error: 'p' is a pointer; did you mean to use '->'?
 p.next = hash[key % MAX_SIZE];
  ^
  ->
/in/foo.c: In function 'isInHash':
/in/foo.c:64:1: error: conversion to non-scalar type requested
 p = (nodeH)malloc(sizeof(nodeH));
 ^
/in/foo.c:65:2: error: 'p' is a pointer; did you mean to use '->'?
 p.key = key;
  ^
  ->
/in/foo.c:66:2: error: 'p' is a pointer; did you mean to use '->'?
 p.next = hash[key % MAX_SIZE];
  ^
  ->
/in/foo.c: At top level:
/in/foo.c:69:5: error: redefinition of 'isInHash'
 int isInHash(long long key){
     ^~~~~~~~
/in/foo.c:62:5: note: previous definition of 'isInHash' was here
 int isInHash(long long key){
     ^~~~~~~~
/in/foo.c: In function 'isInHash':
/in/foo.c:72:5: error: 'p' is a pointer; did you mean to use '->'?
 if(p.key == key)
     ^
     ->
/in/foo.c:74:6: error: 'p' is a pointer; did you mean to use '->'?
 p = p.next;
      ^
      ->
/in/foo.c: In function 'addToQueue':
/in/foo.c:81:5: error: 'tail' is a pointer; did you mean to use '->'?
 tail.status = status;
     ^
     ->
/in/foo.c:82:5: error: 'tail' is a pointer; did you mean to use '->'?
 tail.step = step;
     ^
     ->
/in/foo.c:83:5: error: 'tail' is a pointer; did you mean to use '->'?
 tail.next = (nodeQ*)malloc(sizeof(nodeQ));
     ^
     ->
/in/foo.c:85:5: error: 'tail' is a pointer; did you mean to use '->'?
 tail.next = NULL;
     ^
     ->
/in/foo.c: In function 'BFS':
/in/foo.c:114:14: error: 'head' is a pointer; did you mean to use '->'?
 status = head.status;
              ^
              ->
/in/foo.c:115:12: error: 'head' is a pointer; did you mean to use '->'?
 step = head.step;
            ^
            ->
/in/foo.c:189:12: error: 'head' is a pointer; did you mean to use '->'?
 head = head.next;
            ^
            ->

信息

递交者
类型
递交
题目
P1252 @.@斗地主
语言
C
递交时间
2017-07-26 13:17:06
评测时间
2017-07-26 13:17:06
评测机
分数
0
总耗时
25ms
峰值内存
3.43 MiB