communication.cpp: In function 'void encode(int, int)':
communication.cpp:15:5: error: 'vector' was not declared in this scope
15 | vector<int> a(2);
| ^~~~~~
communication.cpp:15:12: error: expected primary-expression before 'int'
15 | vector<int> a(2);
| ^~~
communication.cpp:16:5: error: 'a' was not declared in this scope
16 | a[1] = (X / 2) % 2;
| ^
communication.cpp: In function 'std::pair<int, int> decode(int)':
communication.cpp:25:5: error: 'vector' was not declared in this scope
25 | vector<pair<int, int>> a(2);
| ^~~~~~
communication.cpp:25:12: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
25 | vector<pair<int, int>> a(2);
| ^~~~
| std::pair
In file included from /usr/include/c++/10/utility:70,
from communication.h:1,
from communication.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
communication.cpp:25:17: error: expected primary-expression before 'int'
25 | vector<pair<int, int>> a(2);
| ^~~
communication.cpp:28:21: error: 'a' was not declared in this scope
28 | if (x == 0) a[0].first++;
| ^
communication.cpp:29:14: error: 'a' was not declared in this scope
29 | else a[0].second++;
| ^
communication.cpp:31:21: error: 'a' was not declared in this scope
31 | if (x == 0) a[1].first++;
| ^
communication.cpp:32:14: error: 'a' was not declared in this scope
32 | else a[1].second++;
| ^
communication.cpp:35:9: error: 'a' was not declared in this scope
35 | if (a[0].first < a[0].second)
| ^
communication.cpp:37:9: error: 'a' was not declared in this scope
37 | if (a[1].first < a[1].second)
| ^