submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s683256747
p00006
C++
#include <iostream> #include <string> #define MAX 20 using namespace std; int main() { char str[MAX]; cin >> str; int len = strlen(str); for (int i = len - 1; i >= 0; i--) { cout << str[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:19: error: 'strlen' was not declared in this scope 12 | int len = strlen(str); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | #include <string>
s193510135
p00006
C++
#include "bits/stdc++.h" using namespace std; long long int gcd(long long int l, long long int r) { assert(l > 0 && r > 0); if (l > r)return gcd(r, l); else { const long long int num = r%l; if (num) { return gcd(l, num); } else { return l; } } } long long int lca(long long int l, long long int r) { return l / gcd(l, r)*r; } int main() { string st; cin >> st; reverse(st.begin(), st.end());% return 0; }
a.cc: In function 'int main()': a.cc:22:39: error: expected primary-expression before '%' token 22 | reverse(st.begin(), st.end());% | ^ a.cc:23:9: error: expected primary-expression before 'return' 23 | return 0; | ^~~~~~
s665212489
p00006
C++
#include <bits/stdcc++.h> using namespace std; int main() { char a[21]; scanf("%s",a); int b=strlen(a); for(int c=b-1;c!=-1;c--)printf("a[c]"); printf("\n"); }
a.cc:1:10: fatal error: bits/stdcc++.h: No such file or directory 1 | #include <bits/stdcc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s083419109
p00006
C++
#include <bits/stdcc++.h> using namespace std; int main() { char a[21]; scanf("%s",a); int b=strlen(a); for(int c=b-1;c!=-1;c--)printf("%c",a[c]); printf("\n"); }
a.cc:1:10: fatal error: bits/stdcc++.h: No such file or directory 1 | #include <bits/stdcc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s557805912
p00006
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <map> //ranker using namespace std; using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using pii = pair<int, int>; using pis = pair<int, string>; using psi = pair<string, int>; using D = double; using P = complex<D>; template <typename T> using PQ = priority_queue<T>; template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>; int main() { string str; cin >> str; reverse( str.begin() , str.end() ); cout << str << endl; return 0; }
a.cc:19:11: error: 'complex' does not name a type 19 | using P = complex<D>; | ^~~~~~~ a.cc:20:34: error: 'priority_queue' does not name a type 20 | template <typename T> using PQ = priority_queue<T>; | ^~~~~~~~~~~~~~ a.cc:21:37: error: 'priority_queue' does not name a type 21 | template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>; | ^~~~~~~~~~~~~~
s968516940
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'reverse' was not declared in this scope 9 | reverse(s.begin(), s.end()); | ^~~~~~~
s732253701
p00006
C++
#include <iostream> #include <string> int main(){ string str; int num; std::cin >> str; num = str.length(); for(int i=num-1; i>=0; i--){ std::cout << str[i]; } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string str; | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:8:15: error: 'str' was not declared in this scope; did you mean 'std'? 8 | std::cin >> str; | ^~~ | std
s329468962
p00006
C++
#include <iostream> #include <string> int main(){ string str; int num; std::cin >> str; num = str.length(); for(int i=num-1; i>=0; i--){ std::cout << str[i]; } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string str; | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:8:15: error: 'str' was not declared in this scope; did you mean 'std'? 8 | std::cin >> str; | ^~~ | std
s855676333
p00006
C++
#include<iostream> using namespace std; int main() { char str[21]; cin >> str; int length = strlen(str),x; for (int i = 0; i < length; i++){ x = length - i-1; cout <<str[x]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:7:22: error: 'strlen' was not declared in this scope 7 | int length = strlen(str),x; | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std; a.cc:9:17: error: 'x' was not declared in this scope 9 | x = length - i-1; | ^
s869056029
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = strlen(str),x; for (int i = 0; i < length; i++){ x = length - i-1; cout <<str[x]; } cout << "\n"; cin >> x; return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: 'strlen' was not declared in this scope 8 | int length = strlen(str),x; | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string> a.cc:10:17: error: 'x' was not declared in this scope 10 | x = length - i-1; | ^ a.cc:14:16: error: 'x' was not declared in this scope 14 | cin >> x; | ^
s648118919
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = strlen(str); int x; for (int i = 0; i < length; i++){ x = length - i - 1; cout <<str[x]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: 'strlen' was not declared in this scope 8 | int length = strlen(str); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s546320141
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = strlen(str); int x; for (int i = 0; i < length; i++){ x = length - i - 1; cout <<str[x]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: 'strlen' was not declared in this scope 8 | int length = strlen(str); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s313425495
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = std::strlen(str); int x; for (int i = 0; i < length; i++){ x = length - i - 1; cout <<str[x]; } cout << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'? 8 | int length = std::strlen(str); | ^~~~~~ | mbrlen
s715774744
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char str[21]; cin >> str; int length = std::strlen(str); int x; for (int i = 0; i < length; i++){ x = length - i - 1; cout <<str[x]; } cout << "\0\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'? 8 | int length = std::strlen(str); | ^~~~~~ | mbrlen
s770077100
p00006
C++
#include<iostream> //#include<algorithm> //#include<cmath> #include<string> //#include<cctype> //#include <vector> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: 'reverse' was not declared in this scope 11 | reverse(s.begin(), s.end()); | ^~~~~~~
s798995881
p00006
C++
#include<iostream> #include<string.h> using namespace std; int main() { char a[30]; while (cin >> a) { strrev(a); cout << a << endl; } }
a.cc: In function 'int main()': a.cc:9:17: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 9 | strrev(a); | ^~~~~~ | strsep
s466057814
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char a[20] = {}; char b[20] = {}; cin >> a; for (int i = 0; i < strlen(a); i++) { b[i] = a[strlen(a) - i]; } cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:29: error: 'strlen' was not declared in this scope 9 | for (int i = 0; i < strlen(a); i++) { | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s229320163
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char a[20] = {}; char b[20] = {}; int alen; cin >> a; alen = strlen(a); for (int i = 0; i < alen; i++) { b[i] = a[alen - i-1]; } cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:16: error: 'strlen' was not declared in this scope 10 | alen = strlen(a); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s364373906
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char a[21] = {}; char b[21] = {}; int alen = 0; cin >> a; alen = strlen(a); for (int i = 0; i < alen; i++) { b[i] = a[alen - i-1]; } cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:16: error: 'strlen' was not declared in this scope 10 | alen = strlen(a); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s785502833
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { char a[21] = {}; char b[21] = {}; int alen = 0; cin >> a; alen = strlen(a); for (int i = 0; alen >= 0; alen--, i++) { b[i] = a[alen -1]; } cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:16: error: 'strlen' was not declared in this scope 10 | alen = strlen(a); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s639270639
p00006
C++
#include <iostream> #include <algorithm> #include <stdlib.h> #include <iomanip> #include <String> #include <cmath> #define PI 3.14159265359 using namespace std; int main() { char tmpstr[20]; cin >> tmpstr; string str(tmpstr); auto itr = str.end() - 1; for (; itr > str.begin(); --itr) { cout << *itr; } cout << *itr << endl; return 0; }
a.cc:5:10: fatal error: String: No such file or directory 5 | #include <String> | ^~~~~~~~ compilation terminated.
s115495329
p00006
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int n; n=strlen(s); char a[n]; for(int i=0;i<n;i++){ a[i]=s[i]; } for(int i=n-1;i>=0;i--){ s[i]=a[i]; } cout<<s<<endl; return(0); }
a.cc: In function 'int main()': a.cc:8:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 8 | n=strlen(s); | ^ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, from a.cc:1: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s803859651
p00006
C++
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() { string s = ""; cin >> s; for (int i = s.length - 1; i >= 0; i--) { cout<< s[i]; }cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:29:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 29 | for (int i = s.length - 1; i >= 0; i--) | ~~^~~~~~ | ()
s879835068
p00006
C++
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; string main() { string s = ""; cin >> s; for (int i = s.length - 1; i >= 0; i--) { cout << s[i]; }cout << endl; return 0; }
a.cc:25:1: error: '::main' must return 'int' 25 | string main() | ^~~~~~ a.cc: In function 'int main()': a.cc:29:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?) 29 | for (int i = s.length - 1; i >= 0; i--) | ~~^~~~~~ | ()
s432259844
p00006
C++
#include <iostream> using namespace std; int main() { char str[20]; cin >> str; int len = strlen(str); for (int i = len; i >0; i--) { cout << str[i-1]; } return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: 'strlen' was not declared in this scope 9 | int len = strlen(str); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 |
s573487502
p00006
C++
#include <iostream> #include<stdio.h> using namespace std; int main() { char str[20]; cin >> str; int len = strlen(str); for (int i = len; i >0; i--) { cout << str[i-1]; } return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: 'strlen' was not declared in this scope 10 | int len = strlen(str); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | #include<stdio.h>
s377234685
p00006
C++
#include <iostream> #include<stdio.h> using namespace std; int main() { char str[20]; cin >> str; int len = strlen(str); for (int i = len; i >0; i--) { cout << str[i-1]; } return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: 'strlen' was not declared in this scope 10 | int len = strlen(str); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | #include<stdio.h>
s320215698
p00006
C++
#include <iostream> using namespace std; int main() { char sr[20]; cin >> sr; int len = strlen(sr); for (int i = len; i >0; i--) { cout << sr[i-1]; } return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: 'strlen' was not declared in this scope 9 | int len = strlen(sr); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 |
s392510710
p00006
C++
#include <iostream> #include <string> using namespace std; int main(){ string str[20]; string str2[20]; cin >> str; for(int i=0; i<sizeof(str)/; i++){ int j = sizeof(str) / sizeof(string); str2[i] = str[j--]; } return 0; }
a.cc: In function 'int main()': a.cc:9:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'}) 9 | cin >> str; | ~~~ ^~ ~~~ | | | | | std::string [20] {aka std::__cxx11::basic_string<char> [20]} | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} 9 | cin >> str; | ^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive] 9 | cin >> str; | ^~~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:9:9: error: cannot bind rvalue '(short int)((std::string*)(& str))' to 'short int&' /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive] 9 | cin >> str; | ^~~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:9:9: error: cannot bind rvalue '(short unsigned int)((std::string*)(& str))' to 'short unsigned int&' /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive] 9 | cin >> str; | ^~~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:9:9: error: cannot bind rvalue '(int)((std::string*)(& str))' to 'int&' /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive] 9 | cin >> str; | ^~~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:9:9: error: cannot bind rvalue '(unsigned int)((std::string*)(& str))' to 'unsigned int&' /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive] 9 | cin >> str; | ^~~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:9:9: error: cannot bind rvalue '(long int)((std::string*)(& str))' to 'long int&' /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive] 9 | cin >> str; | ^~~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:9:9: error: cannot bind rvalue '(long unsigned int)((std::string*)(& str))' to 'long unsigned int&' /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive] 9 | cin >> str; | ^~~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:9:9: error: cannot bind rvalue '(long long int)((std::string*)(& str))' to 'long long int&' /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive] 9 | cin >> str; | ^~~ | | | std::string* {aka std::__cxx11::basic_string<char>*} a.cc:9:9: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& str))' to 'long long unsigned int&' /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:9:9: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 9 | cin >> str; | ^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(s
s488875324
p00006
C++
#include <iostream> using namespace std; int main() { string str,str2=""; cin >> str; for(int i = str.length() - 1; i >= 0; i--) str2 += str[i]; str2 += NULL; cout << str2; return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: ambiguous overload for 'operator+=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'long int') 11 | str2 += NULL; | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:1377:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator+=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 1377 | operator+=(const basic_string& __str) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1387:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator+=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 1387 | operator+=(const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:1397:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator+=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 1397 | operator+=(_CharT __c) | ^~~~~~~~
s808787499
p00006
C++
process.stdin.resume(); process.stdin.setEncoding('utf8'); // Here your code ! process.stdin.on("data",function(chunk){ console.log(chunk.split("").reverse().join()) })
a.cc:2:27: warning: multi-character character constant [-Wmultichar] 2 | process.stdin.setEncoding('utf8'); | ^~~~~~ a.cc:1:1: error: 'process' does not name a type 1 | process.stdin.resume(); | ^~~~~~~ a.cc:2:1: error: 'process' does not name a type 2 | process.stdin.setEncoding('utf8'); | ^~~~~~~ a.cc:5:1: error: 'process' does not name a type 5 | process.stdin.on("data",function(chunk){ | ^~~~~~~ a.cc:7:2: error: expected unqualified-id before ')' token 7 | }) | ^
s709255987
p00006
C++
process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on("data",function(chunk){ console.log(chunk.split("").reverse().join()) })
a.cc:2:27: warning: multi-character character constant [-Wmultichar] 2 | process.stdin.setEncoding('utf8'); | ^~~~~~ a.cc:1:1: error: 'process' does not name a type 1 | process.stdin.resume(); | ^~~~~~~ a.cc:2:1: error: 'process' does not name a type 2 | process.stdin.setEncoding('utf8'); | ^~~~~~~ a.cc:4:1: error: 'process' does not name a type 4 | process.stdin.on("data",function(chunk){ | ^~~~~~~ a.cc:6:2: error: expected unqualified-id before ')' token 6 | }) | ^
s052858309
p00006
C++
import sys lines = [] for line in sys.stdin: print(line[::-1])
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s337608564
p00006
C++
#include "stdafx.h" #include <iostream> #include <sstream> #include <vector> #include <algorithm> #include <string> #include <functional> #include <numeric> #include <ctype.h> #include <cstdlib> #include <string.h> #include <cmath> #include <cstdio> using namespace std; int main() { string input, str; cin >> input; for (auto a : input) { str.insert(str.begin(), a); } cout << str << endl; }
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s748525140
p00006
C++
include <iostream> #include <string> using namespace std; int main() { string str; cin >> str; for (int i = str.size()-1; i >= 0; i--) { cout << str[i]; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.h: At global scope: /usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type 198 | _GLIBCXX14_CONSTEXPR std::size_t |
s014989259
p00006
C++
include <iostream> #include <string> using namespace std; int main() { string str; cin >> str; for (int i = str.size()-1; i >= 0; i--) { cout << str[i]; } cout<<endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.h: At global scope: /usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type 198 | _GLIBCXX14_CONSTEXPR std::size_t |
s598002432
p00006
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string.h> using namespace std; int main(){ string x; int i; cin>>x; for(i=x.size();i--){ cout<<x[i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:23: error: expected ';' before ')' token 10 | for(i=x.size();i--){ | ^ | ;
s134195268
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; for(int i=19;i>=0;i--){ cout<<"change[i]; } return 0; }
a.cc:10:15: warning: missing terminating " character 10 | cout<<"change[i]; | ^ a.cc:10:15: error: missing terminating " character 10 | cout<<"change[i]; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:11:9: error: expected primary-expression before '}' token 11 | } | ^
s934214281
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; int j=strlen(change); j-=1; for(int i=j;i>=0;i--){ cout<<"change[i]; } return 0; }
a.cc:12:15: warning: missing terminating " character 12 | cout<<"change[i]; | ^ a.cc:12:15: error: missing terminating " character 12 | cout<<"change[i]; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope 9 | int j=strlen(change); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std; a.cc:13:9: error: expected primary-expression before '}' token 13 | } | ^
s641716889
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; int j=strlen(change); j-=1; for(int i=j;i>=0;i--){ cout<<"change[i]; } return 0; }
a.cc:12:15: warning: missing terminating " character 12 | cout<<"change[i]; | ^ a.cc:12:15: error: missing terminating " character 12 | cout<<"change[i]; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope 9 | int j=strlen(change); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std; a.cc:13:9: error: expected primary-expression before '}' token 13 | } | ^
s447056565
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; int j=strlen(change); j-=1; for(int i=j;i>=0;i--){ cout<<change[i]; } return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope 9 | int j=strlen(change); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std;
s992381449
p00006
C++
#include<iostream> using namespace std; int main() { char change[19]; cout<<"??????????????\????????????????????????\n"; cin>>change[19]; int j=strlen(change); j-=1; for(int i=j;i>=0;i--){ cout<<change[i]; } return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'strlen' was not declared in this scope 9 | int j=strlen(change); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std;
s983253824
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; if(s.size()<=20){ for(int i=s.size();i>=0;i--){ cout << s[i-1]; } cout << endl; } } return 0; }
a.cc:14:9: error: expected unqualified-id before 'return' 14 | return 0; | ^~~~~~ a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s552106281
p00006
C++
#include <bits/stdc++.h> #include <vector> using namespace std; string ilham, bojos; int ndaru; int main(){ cin >> ilham; ndaru = ilham.length(); for(int i = ndaru-1; i >= 0; i-){ bojos = bojos + ilham[i]; } cout << bojos << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:10:40: error: expected primary-expression before ')' token 10 | for(int i = ndaru-1; i >= 0; i-){ | ^
s134518485
p00006
C++
#include<iostream> using namespace std; void solver() { string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; } int main() { solver(); return 0; }
a.cc: In function 'void solver()': a.cc:6:5: error: 'reverse' was not declared in this scope 6 | reverse(str.begin(),str.end()); | ^~~~~~~
s070387060
p00006
C++
#include <iostream> #include <cstdio> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: 'strlen' was not declared in this scope 9 | reverse(str,str+strlen(str)); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> 3 | #define N 20 a.cc:9:5: error: 'reverse' was not declared in this scope 9 | reverse(str,str+strlen(str)); | ^~~~~~~
s531587826
p00006
C++
#include <iostream> #include <cstdio> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:10:21: error: 'strlen' was not declared in this scope 10 | reverse(str,str+strlen(str)); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> 3 | a.cc:10:5: error: 'reverse' was not declared in this scope 10 | reverse(str,str+strlen(str)); | ^~~~~~~
s525736322
p00006
C++
#include <iostream> #include <cstdio> #include <cstring> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'reverse' was not declared in this scope 11 | reverse(str,str+strlen(str)); | ^~~~~~~
s448906099
p00006
C++
#include <iostream> #include <cstdio> #include <algorithm> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:11:21: error: 'strlen' was not declared in this scope 11 | reverse(str,str+strlen(str)); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> 4 |
s013576772
p00006
C++
#include <iostream> #include <cstdio> #include <string> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:11:21: error: 'strlen' was not declared in this scope 11 | reverse(str,str+strlen(str)); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> 3 | #include <string> a.cc:11:5: error: 'reverse' was not declared in this scope 11 | reverse(str,str+strlen(str)); | ^~~~~~~
s331621263
p00006
C++
#include <iostream> #include <cstdio> #include <cstring> #define N 20 using namespace std; int main() { char str[N]; cin >> str; reverse(str,str+strlen(str)); printf("%s\n",str); return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'reverse' was not declared in this scope 10 | reverse(str,str+strlen(str)); | ^~~~~~~
s283951232
p00006
C++
#include <iostream> using namaspace std; int main(){ char str[20]; for (int A=0;A<20;A++)cin>>str[A]; for (int A=19;A>=0;A--)cout<<str[A]; cout<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namaspace' 2 | using namaspace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:31: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | for (int A=0;A<20;A++)cin>>str[A]; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:32: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | for (int A=19;A>=0;A--)cout<<str[A]; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s731439589
p00006
C++
#include <iostream> using namaspace std; int main(){ char str[20],i=-1; for (;;){ i++; while(cin>>str[i]==EOF) break; } for (int A=i;A>=0;A--)cout<<str[i]; cout<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namaspace' 2 | using namaspace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:23: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | while(cin>>str[i]==EOF) break; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | for (int A=i;A>=0;A--)cout<<str[i]; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:10:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s100299495
p00006
C++
#include<iostream> #include<cstring> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; return 0;; }
a.cc: In function 'int main()': a.cc:9:3: error: 'reverse' was not declared in this scope 9 | reverse(str.begin(),str.end()); | ^~~~~~~
s823379357
p00006
C++
#include<stdio.h> #include<string.h> #include<iostream> #include<vector> #include<set> #include<queue> #include<ctype.h> #include<math.h> #include<map> using namespace std; int main() { char a[21]; gets(a); int len=strlen(a); for(int i=len-1;i>=0;i--) putchar(a[i]); return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 14 | gets(a); | ^~~~ | getw
s111025009
p00006
C++
#include<iostream> #include<cstring> using namespace std; int main() { char str[30]; gets(str); for(int i=strlen(str)-1;i>=0;i--) cout<<str[i]; cout<<endl; }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(str); | ^~~~ | getw
s716698305
p00006
C++
// // Created by Undefined on 2018/2/2. // #include <iostream> #include <cstring> using namespace std; int main () { char s[21], tmp; gets(s); for (int i = 0, j = strlen(s) - 1; i < j; i++, j--) { tmp = s[i]; s[i] = s[j]; s[j] = tmp; } printf("%s\n", s); }
a.cc: In function 'int main()': a.cc:12:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | gets(s); | ^~~~ | getw
s531854299
p00006
C++
// In the name of Allah #include <stdio.h> #include <string.h> int main(){ char st[21]; scanf("%s",&st); strrev(st); printf("%s",st); return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 8 | strrev(st); | ^~~~~~ | strsep
s535735807
p00006
C++
string = input("input data") size = len(string) st = [] for i in range(size): st.append(string[size-i-1]) print(''.join(st), end='')
a.cc:6:7: error: empty character constant 6 | print(''.join(st), end='') | ^~ a.cc:6:24: error: empty character constant 6 | print(''.join(st), end='') | ^~ a.cc:1:1: error: 'string' does not name a type 1 | string = input("input data") | ^~~~~~
s243975520
p00006
C++
string = input("input data") size = len(string) st = [] for i in range(size): st.append(string[size-i-1]) print(''.join(st), end='') print('')
a.cc:6:7: error: empty character constant 6 | print(''.join(st), end='') | ^~ a.cc:6:24: error: empty character constant 6 | print(''.join(st), end='') | ^~ a.cc:7:7: error: empty character constant 7 | print('') | ^~ a.cc:1:1: error: 'string' does not name a type 1 | string = input("input data") | ^~~~~~
s345109585
p00006
C++
#include<iostream> #include<string> int main(void){ std::string str; std::getline(std::cin,str); str.reverse(str.begin(),sr.end()); std::cout<<str<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'? 8 | str.reverse(str.begin(),sr.end()); | ^~~~~~~ | reserve a.cc:8:29: error: 'sr' was not declared in this scope; did you mean 'str'? 8 | str.reverse(str.begin(),sr.end()); | ^~ | str
s655992409
p00006
C++
#include<iostream> #include<string> int main(void){ std::string str; std::getline(std::cin,str); str.reverse(str.begin(),str.end()); std::cout<<str<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'? 8 | str.reverse(str.begin(),str.end()); | ^~~~~~~ | reserve
s965185026
p00006
C++
#include<iostream> #include<algorithm> #include<string> int main(void){ std::string str; std::getline(std::cin,str); str.reverse(str.begin(),str.end()); std::cout<<str<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'? 9 | str.reverse(str.begin(),str.end()); | ^~~~~~~ | reserve
s880278727
p00006
C++
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System. in); String line = sc.nextLine(); char[] str = line.toCharArray(); char[] rts = new char[20]; for(int i=0;i<20;i++){ str[20-i]=rts[i]; } for(int i=0;i<20;i++){ System.out.print(rts[i]); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
s054790300
p00006
C++
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System. in); String line = sc.nextLine(); char[] str = line.toCharArray(); int n = line.length(); char[] rts = new char[20]; for(int i=0;i<n;i++){ rts[i]=str[n-i-1]; } for(int i=0;i<n;i++){ System.out.print(rts[i]); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
s922549863
p00006
C++
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<iostream> using namespace std; int main() { char c[20]; int size = 0; for (;;) { scanf_s("%c", &c[size]); if (c[size] == '\n')break; size++; } for (int i = size; i >= 0; i--) { printf("%c", c[i]); } printf("\n"); //system("pause"); return 0; }
a.cc: In function 'int main()': a.cc:14:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 14 | scanf_s("%c", &c[size]); | ^~~~~~~ | scanf
s962505390
p00006
C++
#include <stdio.h> int main(void){ // Your code here! int main(void){ char str[100]; int i; int count=0; scanf("%s",str); for(i=0;str[i]!='\0';i++){ count++; } for(i=count-1;i>=0;i--){ printf("%c",str[i]); } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:4:19: error: a function-definition is not allowed here before '{' token 4 | int main(void){ | ^ a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:2:15: note: to match this '{' 2 | int main(void){ | ^
s122439197
p00006
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; cout << reverse(s.begin(), s.end()) << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'void') 7 | cout << reverse(s.begin(), s.end()) << endl; | ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | void | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'void' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'void' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'void' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'void' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'void' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'void' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'void' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'void' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'void' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'void' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'void' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'void' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'void' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'void' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'void' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from 'void' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from 'void' to 'std::nullptr_t' 306 | operator<<(nullptr_t) | ^~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:124:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits
s500522819
p00006
C++
main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);} | ^
s411753207
p00006
C++
main(i){char a[21];for(scanf("%s",a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i){char a[21];for(scanf("%s",a),i=strlen(a)+1;i;i--)putchar(a[i-1]);} | ^
s947243292
p00006
C++
#include<stdio,h> #include<string.h> int main(){ char a[20]; int l,i; scanf("%s",a); l=strlen(a); for(i=l-1;i>=0;i--) printf("%c",a[i]); return 0; }
a.cc:1:9: fatal error: stdio,h: No such file or directory 1 | #include<stdio,h> | ^~~~~~~~~ compilation terminated.
s687642933
p00006
C++
main(a,b){ for(;scanf("%d%d",&a,&b);puts(&a)) a=log10(a+b)+49; }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b){ | ^
s542760005
p00006
C++
#include <stdio.h> int main (void) { char str[21], new_str[21]; gets(str); int i; for(i=0; i<21; i++){ new_str[i]='\0'; } for(i=0; i<20; i++){ if(str[i]=='\0' || str[i]=='\n'){break;} new_str[20-i]=str[i]; } for(i=0; i<21; i++){ if(new_str[i]!='\0'){printf("%c", new_str[i]);} } printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(str); | ^~~~ | getw
s953832802
p00006
C++
#include<iostream> int main(){char c[21];std::cin>>c;std::string d(c);std::reverse(d.begin(),d.end());std::cout<<d.c_str()<<'\n';}
a.cc: In function 'int main()': a.cc:2:57: error: 'reverse' is not a member of 'std' 2 | int main(){char c[21];std::cin>>c;std::string d(c);std::reverse(d.begin(),d.end());std::cout<<d.c_str()<<'\n';} | ^~~~~~~
s877318547
p00006
C++
main(n){n-10&&main((getchar()),putchar(n));exit(!puts(""));}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(n){n-10&&main((getchar()),putchar(n));exit(!puts(""));} | ^
s608364446
p00006
C++
int main(){ char buff[100]; int n; scanf("%s",buff); for(n = strlen(buff); n;) putchar(buff[--n]); return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'scanf' was not declared in this scope 4 | scanf("%s",buff); | ^~~~~ a.cc:5:11: error: 'strlen' was not declared in this scope 5 | for(n = strlen(buff); n;) putchar(buff[--n]); | ^~~~~~ a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' +++ |+#include <cstring> 1 | int main(){ a.cc:5:29: error: 'putchar' was not declared in this scope; did you mean 'char'? 5 | for(n = strlen(buff); n;) putchar(buff[--n]); | ^~~~~~~ | char
s083687076
p00006
C++
int main(){ char buff[100]; int n; scanf("%s",buff); for(n = strlen(buff); n;) putchar(buff[--n]); puts(""); return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'scanf' was not declared in this scope 4 | scanf("%s",buff); | ^~~~~ a.cc:5:11: error: 'strlen' was not declared in this scope 5 | for(n = strlen(buff); n;) putchar(buff[--n]); | ^~~~~~ a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' +++ |+#include <cstring> 1 | int main(){ a.cc:5:29: error: 'putchar' was not declared in this scope; did you mean 'char'? 5 | for(n = strlen(buff); n;) putchar(buff[--n]); | ^~~~~~~ | char a.cc:6:3: error: 'puts' was not declared in this scope 6 | puts(""); | ^~~~
s928645276
p00006
C++
main(n){~n&&main(getchar())+(putchar(n-1?n:10));return 0;}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(n){~n&&main(getchar())+(putchar(n-1?n:10));return 0;} | ^
s079938055
p00006
C++
main(c){c=getchar();c^10&&main(c)*putchar(c);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(c){c=getchar();c^10&&main(c)*putchar(c);} | ^
s055337813
p00006
C++
main(c){scanf("%c",&c)&&c^10&&main(c)*printf(&c);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(c){scanf("%c",&c)&&c^10&&main(c)*printf(&c);} | ^
s871601112
p00006
C++
main(i){i*=i-10&&main(getchar())*putchar(i-1?i:10);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i){i*=i-10&&main(getchar())*putchar(i-1?i:10);} | ^
s051927198
p00006
C++
char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));}
a.cc:1:15: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));} | ^~~~ a.cc: In function 'int main()': a.cc:1:22: error: 'gets' was not declared in this scope 1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));} | ^~~~ a.cc:1:36: error: 'index' was not declared in this scope 1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));} | ^~~~~ a.cc:1:51: error: 'putchar' was not declared in this scope; did you mean 'char'? 1 | char b[99],*p;main(){gets(b);for(p=index(b,0);p-b;putchar(*--p));} | ^~~~~~~ | char
s448927976
p00006
C++
main(i,s){ char*p=s+20; while(~(*p--=getchar()));puts(s); }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i,s){ | ^
s881580010
p00006
C++
#include<iostream> #include<string> using namespace std; int main() { string str; cin >> str; for(int i = str.length(); i > -1; i--){ cout << str[i-1s] << flush; } cout << endl; }
a.cc: In function 'int main()': a.cc:13:31: error: unable to find numeric literal operator 'operator""s' 13 | cout << str[i-1s] << flush; | ^~
s661094662
p00006
C++
#include <cstdio> int main( int argc, char *argv[] ) { using namespace std; char str[20]; fscanf(stdin, "%s", str); for (int i=0; i<20; i++) { if (str[i] == '\0') { int last = i-1; for (int j=0; j<i/2; j++) { swap(str[j], str[last-j]); } break; } } printf("%s\n", str); return 0; }
a.cc: In function 'int main(int, char**)': a.cc:10:33: error: 'swap' was not declared in this scope 10 | swap(str[j], str[last-j]); | ^~~~
s057559949
p00006
C++
#include <iostream> #include <sstream> #include <string> using namespace std; int main(void) { string str; getline(cin, str); reverse(str.begin(), str.end()); cout << str << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'reverse' was not declared in this scope 13 | reverse(str.begin(), str.end()); | ^~~~~~~
s101921263
p00006
C++
#include <stdio.h> #include<string.h> int main(void){ int i,j,n; i=0; j=0; char a[20],b[20]; gets(a); n = strlen(a); for(i=n-1;i>=0;i--) { b[n-1-i]=a[i]; } b[n]='\0'; printf("%s\n",b); return 0; }
a.cc: In function 'int main()': a.cc:10:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(a); | ^~~~ | getw
s437764497
p00006
C++
#include <cstdio> #include <stack> using namespace std; int main() { char str[22]; fgets( str, sizeof( str ) - 1, stdin ); for ( int i = strlen( str ) - 1; 0 <= i; i-- ) { putchar( str[i] ); } return 0; }
a.cc: In function 'int main()': a.cc:12:23: error: 'strlen' was not declared in this scope 12 | for ( int i = strlen( str ) - 1; 0 <= i; i-- ) | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <stack> +++ |+#include <cstring> 3 |
s872360859
p00006
C++
import java.util.Scanner; public class Main{ Main(){ Scanner sc= new Scanner(System.in); while(sc.hasNext()){ String str = sc.next(); char[] ch = str.toCharArray(); for(int i = str.length()-1; i >= 0; i--) System.out.print(Character.toString(ch[i])); System.out.println(); } } public static void main(String[] args){ new Main(); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s755578814
p00006
C++
#include <stdio.h> #include <string.h> int main(void) { char str[256]; char rev[256]; for (int i = 0; str[i] != '\0'; i++){ rev[i] = str[strlen(str) - 1 - i; } rev[strlen(str)] = '\0'; printf("%s", rev); return (0); }
a.cc: In function 'int main()': a.cc:10:33: error: expected ']' before ';' token 10 | rev[i] = str[strlen(str) - 1 - i; | ^ | ]
s739158543
p00006
C++
#include<iostream> #include<string> using namespace std; int main(){ char str[30], *end_p; int end;; cin >>str; end_p = strrchr(str, '\0'); end = end_p - str; for(int i = (end - 1); i >= 0; i--){ cout <<str[i]; } cout <<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:17: error: 'strrchr' was not declared in this scope 10 | end_p = strrchr(str, '\0'); | ^~~~~~~ a.cc:2:1: note: 'strrchr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | #include<string>
s551299271
p00006
C++
main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a[20],i){for(i=0;~scanf("%c",&a[i]);i++);while(i--)printf("%c",a[i]);} | ^
s741539937
p00006
C++
main(a){~scanf("%c",&a)&&(main(),printf("%c",a));}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a){~scanf("%c",&a)&&(main(),printf("%c",a));} | ^
s866943484
p00006
C++
#include <iostream> #include <string> #include <algorithm> int main(){ string str; while(cin >> str){ reverse(str.begin(), str.end()); cout << str << endl; } }
a.cc: In function 'int main()': a.cc:6:3: error: 'string' was not declared in this scope 6 | string str; | ^~~~~~ a.cc:6:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | while(cin >> str){ | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:16: error: 'str' was not declared in this scope; did you mean 'std'? 7 | while(cin >> str){ | ^~~ | std a.cc:8:5: error: 'reverse' was not declared in this scope; did you mean 'std::reverse'? 8 | reverse(str.begin(), str.end()); | ^~~~~~~ | std::reverse In file included from /usr/include/c++/14/algorithm:86, from a.cc:3: /usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: 'std::reverse' declared here 249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last); | ^~~~~~~ a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << str << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << str << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s068253417
p00006
C++
#include <stdio.h> #include <string> int main(void){ char c[21]; scanf("%s", c); for(int i=strlen(c)-1; i>=0; --i){ printf("%c", *(c+i)); } return 0; }
a.cc: In function 'int main()': a.cc:7:19: error: 'strlen' was not declared in this scope 7 | for(int i=strlen(c)-1; i>=0; --i){ | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <string> +++ |+#include <cstring> 3 |
s681553100
p00006
C++
#include<iostream> #include<cstring> using namespace std; int main(){ string str; int len; while(1){ cin >> str; if(str == EOF)break; len = str.length(); for(int i=len;i>=0;i--){ cout << str[i]; } } return 0; }
a.cc: In function 'int main()': a.cc:10:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 10 | if(str == EOF)break; | ~~~ ^~ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 10 | if(str == EOF)break; | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 10 | if(str == EOF)break; | ^~~ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 10 | if(str == EOF)break; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 10 | if(str == EOF)break; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 10 | if(str == EOF)break; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 10 | if(str == EOF)break; | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 10 | if(str == EOF)break; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 10 | if(str == EOF)break; | ^~~ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 10 | if(str == EOF)break; | ^~~ /usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:10:11: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 10 | if(str == EOF)break; | ^~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:10:11: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 10 | if(str == EOF)break; | ^~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:10:11: note: mismatched types 'const _CharT*' and 'int' 10 | if(str == EOF)break; | ^~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:10:11: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>' 10 | if(str == EOF)break; | ^~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>' 10 | if(str == EOF)break; | ^~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>' 10 | if(str == EOF)break; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33, from /usr/include/c++/14/bits/allocator.h:46: /usr/include/c++/14/bits/new_allocator.h:215:9: note: candidate: 'template<class _Up> bool std::operator==(const __new_allocator<char>&,
s583692353
p00006
C++
using namespace std; main(){ char str[21]; int i=0; while(cin >> str[i]){i++;} i--; int j=i; for(j=i;j>=0;j--){ cout << str[j] ; } cout << endl; return 0; }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | while(cin >> str[i]){i++;} | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:14:5: error: 'cout' was not declared in this scope 14 | cout << str[j] ; | ^~~~ a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:16:3: error: 'cout' was not declared in this scope 16 | cout << endl; | ^~~~ a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:16:11: error: 'endl' was not declared in this scope 16 | cout << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 |
s441016501
p00006
C++
#include <string.h> #include <ctype.h> main(i){char s[21];scanf("%s",s);if(s[16]=='9')return 1;return 0;}
a.cc:3:5: error: expected constructor, destructor, or type conversion before '(' token 3 | main(i){char s[21];scanf("%s",s);if(s[16]=='9')return 1;return 0;} | ^
s936000191
p00006
C++
#include<stdio.h> #include<stdlib.h> int main(void){ char a,b,i,j; char rarara[1000]; char papapa[1000]; gets(rarara); for(i=0;rarara[i]!=NULL;i++){}; a=i; for(i=0;i<a;i++) papapa[i]=rarara[a-i-1]; papapa[a]=NULL; printf("%s\n",papapa); return; }
a.cc: In function 'int main()': a.cc:7:2: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(rarara); | ^~~~ | getw a.cc:8:21: warning: NULL used in arithmetic [-Wpointer-arith] 8 | for(i=0;rarara[i]!=NULL;i++){}; | ^~~~ a.cc:12:13: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null] 12 | papapa[a]=NULL; | ^~~~ a.cc:14:3: error: return-statement with no value, in function returning 'int' [-fpermissive] 14 | return; | ^~~~~~
s078025849
p00006
C++
#include<stdio.h> #include<stdlib.h> int main(void){ char a,b,i,j; char rarara[1000]; char papapa[1000]; fgets(rarara,sizeof(rarara),stdin); for(i=0;rarara[i]!=NULL;i++){}; a=i; for(i=0;i<a;i++) papapa[i]=rarara[a-i-1]; papapa[a]=NULL; printf("%s\n",papapa); return; }
a.cc: In function 'int main()': a.cc:8:21: warning: NULL used in arithmetic [-Wpointer-arith] 8 | for(i=0;rarara[i]!=NULL;i++){}; | ^~~~ a.cc:12:13: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null] 12 | papapa[a]=NULL; | ^~~~ a.cc:14:3: error: return-statement with no value, in function returning 'int' [-fpermissive] 14 | return; | ^~~~~~