/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:5: error: 'cin' was not declared in this scope
     cin>>n>>k;
     ^~~
foo.cc:6:5: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0,
                 from foo.cc:1:
/usr/include/c++/7/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^~~
foo.cc:11:17: error: 'buffer' was not declared in this scope
         memmove(buffer,text+a,sizeof(int)*len);//待粘贴数字
                 ^~~~~~
foo.cc:11:17: note: suggested alternative: 'setbuffer'
         memmove(buffer,text+a,sizeof(int)*len);//待粘贴数字
                 ^~~~~~
                 setbuffer
foo.cc:16:27: error: 'cout' was not declared in this scope
     for(int i=1;i<=10;i++)cout<<text[i]<<endl;
                           ^~~~
foo.cc:16:27: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0,
                 from foo.cc:1:
/usr/include/c++/7/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~
foo.cc:16:42: error: 'endl' was not declared in this scope
     for(int i=1;i<=10;i++)cout<<text[i]<<endl;
                                          ^~~~
foo.cc:16:42: note: suggested alternative:
In file included from /usr/include/c++/7/istream:39:0,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/ostream:590:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1058 粘贴文本
语言
C++
递交时间
2021-07-11 19:01:29
评测时间
2021-07-11 19:01:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes