Problem bobek
User Pan
Submission Time 2023-09-06 15:33:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bobek.cpp: In function ‘int main()’:
bobek.cpp:22:21: error: ‘bitset’ was not declared in this scope
22 | string bi = bitset<16>(i1).to_string().substr(16 - b1);
| ^~~~~~
bobek.cpp:4:1: note: ‘std::bitset’ is defined in header ‘<bitset>’; did you forget to ‘#include <bitset>’?
3 | #include <algorithm>
+++ |+#include <bitset>
4 | #include <string>
bobek.cpp:22:36: error: request for member ‘to_string’ in ‘i1’, which is of non-class type ‘int’
22 | string bi = bitset<16>(i1).to_string().substr(16 - b1);
| ^~~~~~~~~
bobek.cpp:33:21: error: ‘bitset’ was not declared in this scope
33 | string bi = bitset<16>(i1).to_string().substr(16 - b2);
| ^~~~~~
bobek.cpp:33:21: note: ‘std::bitset’ is defined in header ‘<bitset>’; did you forget to ‘#include <bitset>’?<