Compile Error
/in/foo.cc: In function 'int main()':
/in/foo.cc:14:30: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
14 | if(binary[i]="1"){
| ^~~
| |
| const char*
/in/foo.cc:14:29: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
14 | if(binary[i]="1"){
/in/foo.cc:15:34: error: 'pow' is not a member of 'std'
15 | a +=std::pow(2, length - i - 1);
| ^~~
信息
- 递交者
- 类型
- 自测
- 题目
- P1081 xf1-4进制转换2
- 语言
- C++
- 递交时间
- 2025-03-29 19:06:54
- 评测时间
- 2025-03-29 19:06:54
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes