/ Vijos /

记录详情

Compile Error

foo.cc: In function 'void* default_alloc(int)':
foo.cc:8:12: error: 'malloc' was not declared in this scope
    8 |     return malloc(size);
      |            ^~~~~~
foo.cc:6:1: note: 'malloc' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
    5 | #include <vector>
  +++ |+#include <cstdlib>
    6 | 
foo.cc: In member function 'NODE<CONTROL>* NODE<CONTROL>::GetInRank(int)':
foo.cc:115:20: error: 'NULL' was not declared in this scope
  115 |             return NULL;
      |                    ^~~~
foo.cc:6:1: note: 'NULL' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
    5 | #include <vector>
  +++ |+#include <cstddef>
    6 | 
foo.cc: In function 'int main()':
foo.cc:235:5: error: 'scanf' was not declared in this scope
  235 |     scanf("%lf", &max_price);
      |     ^~~~~
foo.cc:299:17: error: 'printf' was not declared in this scope
  299 |                 printf("Dui bu qi,Mei you.\n");
      |                 ^~~~~~
foo.cc:6:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
    5 | #include <vector>
  +++ |+#include <cstdio>
    6 | 
foo.cc:302:17: error: 'printf' was not declared in this scope
  302 |                 printf("You. %d Yuan.\n", price);
      |                 ^~~~~~
foo.cc:302:17: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
foo.cc:305:17: error: 'printf' was not declared in this scope
  305 |                 printf("Mei you. Zhe ge ke yi you. Zhe ge zhen mei you!\n");
      |                 ^~~~~~
foo.cc:305:17: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1647 不差钱
语言
C++
递交时间
2023-07-16 18:13:43
评测时间
2023-07-16 18:13:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes