记录详情

Compile Error

foo.cc: In constructor 'BitSet::BitSet(unsigned int)':
foo.cc:12:9: error: 'memset' was not declared in this scope
   12 |         memset(arr, 0, sizeof(arr));
      |         ^~~~~~
foo.cc:4:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    3 | #include <cmath>
  +++ |+#include <cstring>
    4 | using namespace std;
foo.cc: In member function 'void BitSet::flip(int)':
foo.cc:65:23: warning: operation on '((BitSet*)this)->BitSet::arr[(31 - pos)]' may be undefined [-Wsequence-point]
   65 |         arr[31 - pos] = (arr[31 - pos] == 1 ? arr[31 - pos] = 0 : arr[31 - pos] = 1);
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1495 Problem 1D. 模拟bitset
比赛
2023秋 悬赏令第一周
语言
C++
递交时间
2023-10-04 18:35:33
评测时间
2023-10-04 18:35:33
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes