cmp.cpp:3:1: error: 'size_t' does not name a type
3 | size_t y[6] = {
| ^~~~~~
cmp.cpp:2:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
1 | #include "cmp.h"
+++ |+#include <cstddef>
2 |
cmp.cpp: In function 'void remember(int)':
cmp.cpp:13:10: error: 'size_t' was not declared in this scope
13 | for (size_t i = 0; i < 6; i++)
| ^~~~~~
cmp.cpp:13:10: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
cmp.cpp:13:24: error: 'i' was not declared in this scope
13 | for (size_t i = 0; i < 6; i++)
| ^
cmp.cpp:14:34: error: 'y' was not declared in this scope
14 | bit_set((n >> (2 * i)) + y[i]);
| ^
cmp.cpp: In function 'int compare(int)':
cmp.cpp:19:5: error: 'size_t' was not declared in this scope
19 | size_t u = 0, v = 5;
| ^~~~~~
cmp.cpp:19:5: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
cmp.cpp:20:12: error: 'u' was not declared in this scope
20 | while (u < v)
| ^
cmp.cpp:20:16: error: 'v' was not declared in this scope
20 | while (u < v)
| ^
cmp.cpp:22:15: error: expected ';' before 'm'
22 | size_t m = (u + v + 1) / 2;
| ^~
| ;
cmp.cpp:23:31: error: 'm' was not declared in this scope
23 | if (bit_get(b >> (2 * m)))
| ^
cmp.cpp:29:23: error: 'u' was not declared in this scope
29 | if (!((b >> (2 * (u - 1))) & 3))
| ^
cmp.cpp:31:22: error: 'u' was not declared in this scope
31 | if (((b >> (2 * (u - 1))) & 3) == 3)
| ^
cmp.cpp:33:22: error: 'u' was not declared in this scope
33 | if (((b >> (2 * (u - 1))) & 3) == 1)
| ^
cmp.cpp:35:35: error: 'u' was not declared in this scope
35 | return bit_get(4 * (b >> (2 * u)) + 3) ? -1 : 1;
| ^