记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:9:2: error: 'cin' was not declared in this scope
    9 |  cin >> str;
      |  ^~~
foo.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    4 | #include<sstream>
  +++ |+#include <iostream>
    5 | using namespace std;
foo.cc:10:15: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   10 |  int l=strlen(str);
      |               ^~~
      |               |
      |               std::string {aka std::__cxx11::basic_string<char>}
In file included from foo.cc:2:
/usr/include/string.h:385:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  385 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1337 解码 [2020年蓝桥杯A组第一场]
语言
C++
递交时间
2022-03-26 19:57:05
评测时间
2022-03-26 19:57:05
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes