submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s706375841 | p03834 | C++ | happy,newyear,enjoy | a.cc:1:1: error: 'happy' does not name a type
1 | happy,newyear,enjoy
| ^~~~~
|
s469341218 | p03834 | C++ | happy,newyear,enjoy | a.cc:1:1: error: 'happy' does not name a type
1 | happy,newyear,enjoy
| ^~~~~
|
s222519730 | p03834 | C++ | #include <bits/stdc++.h>
int main () {
string s; cin >> s;
for (int i = 0; i < s.size(); ++i) {
if (s[i] == ‘,’) {
s[i] = “ “;
}
}
cout << s << endl;
return 0;
} | a.cc:6:18: error: extended character ‘ is not valid in an identifier
6 | if (s[i] == ‘,’) {
| ^
a.cc:6:20: error: extended character ’ is not valid in an identifier
6 | if (s[i] == ‘,’) {
| ^
a.cc:7:16: error: extended character “ is not valid in an identifier
7 | s[i] = “ “;
| ^
a.cc:7:18: error: extended character “ is not valid in an identifier
7 | s[i] = “ “;
| ^
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
4 | string s; cin >> s;
| ^~~~~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:4:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | string s; cin >> s;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:4:21: error: 's' was not declared in this scope
4 | string s; cin >> s;
| ^
a.cc:6:18: error: '\U00002018' was not declared in this scope
6 | if (s[i] == ‘,’) {
| ^
a.cc:6:20: error: '\U00002019' was not declared in this scope
6 | if (s[i] == ‘,’) {
| ^
a.cc:7:16: error: '\U0000201c' was not declared in this scope
7 | s[i] = “ “;
| ^
a.cc:10:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout << s << 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:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | cout << s << endl;
| ^~~~
| std::endl
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:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s790383804 | p03834 | C++ | #include <bits/stdc++.h>
int main () {
for (int i = 0; i < 19; ++i) {
char c;
cin >> c;
if (c == ‘,’) {
cout << “ “;
} else {
cout << c;
}
cout << endl;
}
return 0;
} | a.cc:7:15: error: extended character ‘ is not valid in an identifier
7 | if (c == ‘,’) {
| ^
a.cc:7:17: error: extended character ’ is not valid in an identifier
7 | if (c == ‘,’) {
| ^
a.cc:8:17: error: extended character “ is not valid in an identifier
8 | cout << “ “;
| ^
a.cc:8:19: error: extended character “ is not valid in an identifier
8 | cout << “ “;
| ^
a.cc: In function 'int main()':
a.cc:6:6: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> c;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
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:7:15: error: '\U00002018' was not declared in this scope
7 | if (c == ‘,’) {
| ^
a.cc:7:17: error: '\U00002019' was not declared in this scope
7 | if (c == ‘,’) {
| ^
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout << “ “;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:17: error: '\U0000201c' was not declared in this scope
8 | cout << “ “;
| ^
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout << c;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:12:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | 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:12:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
12 | cout << endl;
| ^~~~
| std::endl
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:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s777086221 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define vsort(v) sort(v.begin(), v.end());
#define rvisort(v) sort(v.begin(), v.end(), greater<int>());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define cout(d) cout<<d<<endl;
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);
#define replaces(s, b, a) replace(s.begin(),s.end(), b, a);
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vs = vector<string>;
using vd = vector<double>;
using ul = unsigned long;
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }
const int mod=1e9+7;
struct mint {
ll x;
mint(ll x=0):x(x%mod){}
mint& operator+=(const mint a) {
if ((x += a.x) >= mod) x -= mod;
return *this;
}
mint& operator-=(const mint a) {
if ((x += mod-a.x) >= mod) x -= mod;
return *this;
}
mint& operator*=(const mint a) {
(x *= a.x) %= mod;
return *this;
}
mint operator+(const mint a) const {
mint res(*this);
return res+=a;
}
mint operator-(const mint a) const {
mint res(*this);
return res-=a;
}
mint operator*(const mint a) const {
mint res(*this);
return res*=a;
}
};
mint c[4005][4005];
void init() {
c[0][0] = 1;
for (int i = 0; i <= 4000; i++) {
for (int j = 0; j <= i; j++) {
c[i+1][j] += c[i][j];
c[i+1][j+1] += c[i][j];
}
}
}
mint comb(int n, int k) {
return c[n][k];
}
bool IsPrime(int num)
{
if (num < 2) return false;
else if (num == 2) return true;
else if (num % 2 == 0) return false;
double sqrtNum = sqrt(num);
for (int i = 3; i <= sqrtNum; i += 2)
{
if (num % i == 0)
{
return false;
}
}
return true;
}
map<ll, ll> primeFact(ll n) {
map<ll, ll> res;
for (ll i = 2; i * i <= n; i++) {
while (n % i == 0) {
res[i]++;
n /= i;
}
}
if (n != 1) res[n]++;
return res;
}
void printv(vi& v){
rep(i,v.size()) cout << v[i] << " ";
cout << endl;
}
void printv(vll& v){
rep(i,v.size()) cout << v[i] << " ";
cout << endl;
}
int vtotal(vi& v){
int total=0;
rep(i,v.size()) total+=v[i];
return total;
}
int main()
{
//init(); // mint初期化
cin.tie( 0 );
ios::sync_with_stdio( false );
string s;cin>>s;
replaces(a,',',' ');
cout(s);
return 0;
} | a.cc: In function 'int main()':
a.cc:131:12: error: 'a' was not declared in this scope
131 | replaces(a,',',' ');
| ^
a.cc:19:35: note: in definition of macro 'replaces'
19 | #define replaces(s, b, a) replace(s.begin(),s.end(), b, a);
| ^
|
s625763931 | p03834 | C++ | #include <bitss/stdc++.h>
using namespace std;
vector<string> split(string str, char del) {
int first = 0;
int last = str.find_first_of(del);
vector<string> result;
while (first < str.size()) {
string subStr(str, first, last - first);
result.push_back(subStr);
first = last + 1;
last = str.find_first_of(del, first);
if (last == string::npos) {
last = str.size();
}
}
return result;
}
int main(){
string s;
vector<string> ans = split(s, ',');
cout << ans[0] << " " << ans[1] << " " << ans[2] << endl;
return 0;
} | a.cc:1:10: fatal error: bitss/stdc++.h: No such file or directory
1 | #include <bitss/stdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s537187189 | p03834 | C++ | #include <iostream >
#include <string >
using namespace std;
int main() {
string a;
string b;
cin >> a >> b;
int i = a.size();
int j = b.size();
if (i > j)
cout << "GREATER";
else if (i < j)
cout << "LESS";
else if (i = j)
for (int t = 0; t<i; t++){
if ((a.at(t)) > (b.at(t))) {
cout << "GREATER";
break;
}
else if ((a.at(t)) < (b.at(t))) {
cout << "LESS";
break;
}
else if ((a.at(t)) = (b.at(t))) {
cout << "EQUAL";
break;
}
}
} | a.cc:1:10: fatal error: iostream : No such file or directory
1 | #include <iostream >
| ^~~~~~~~~~~
compilation terminated.
|
s104098434 | p03834 | C++ |
#include<iostream>
using namespace std;
int main(){
string s[19];
for(int i=0;i<19;i++)
{cin>>s[i];
}
s[5]=' ';
s[13]=' ';
for(int i=0;i<19;i++)
{
if(s[i]!=,)
cout<<s[i];
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:18: error: expected primary-expression before ',' token
14 | if(s[i]!=,)
| ^
a.cc:14:19: error: expected primary-expression before ')' token
14 | if(s[i]!=,)
| ^
|
s750441170 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
chars[20];
cin>>s;
s[5]=' ';
s[13]=' ';
cout << s <<endl;
} | a.cc: In function 'int main()':
a.cc:4:4: error: 'chars' was not declared in this scope; did you mean 'char'?
4 | chars[20];
| ^~~~~
| char
a.cc:5:8: error: 's' was not declared in this scope
5 | cin>>s;
| ^
|
s502837952 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
vector<char>s(20);
cin>>s;
s.at(5)=" ";
s.at(13)=" ";
cout << s <<endl;
} | a.cc: In function 'int main()':
a.cc:5:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char>')
5 | cin>>s;
| ~~~^~~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<char>}
In file included 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/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>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/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>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/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>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<char>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/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>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/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>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/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>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/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>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<char>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/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>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/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>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/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::vector<char>' 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::vector<char>' 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::vector<char>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/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>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/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::vector<char>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cs |
s617907038 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
s.at(5)=" ";
s.at(13)=" ";
cout << s <<endl;
} | a.cc: In function 'int main()':
a.cc:6:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
6 | s.at(5)=" ";
| ^~~
| |
| const char*
a.cc:7:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
7 | s.at(13)=" ";
| ^~~
| |
| const char*
|
s444663827 | p03834 | C++ | #include<iostream>
using namespace std;
int main(){
string x;
cin>>x;
s[5]=' ';
s[13]=' ';
cout<<x;
} | a.cc:7:6: warning: multi-character character constant [-Wmultichar]
7 | s[5]=' ';
| ^~~~
a.cc:8:7: warning: multi-character character constant [-Wmultichar]
8 | s[13]=' ';
| ^~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 's' was not declared in this scope
7 | s[5]=' ';
| ^
|
s714984362 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
string.at(6) = ' ';
string.at(14) = ' ';
cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:8:11: error: expected unqualified-id before '.' token
8 | string.at(6) = ' ';
| ^
a.cc:9:11: error: expected unqualified-id before '.' token
9 | string.at(14) = ' ';
| ^
|
s099495750 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
//long long
using ll = long long;
//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
// begin() end()
#define all(x) (x).begin(),(x).end()
//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
//最大公約数
unsigned gcd(unsigned a, unsigned b) {
if(a < b) return gcd(b, a);
unsigned r;
while ((r=a%b)) {
a = b;
b = r;
}
return b;
}
int main(){
int S;
string S;
S.at(5) = ' ';
S.at(13) = ' ';
} | a.cc: In function 'int main()':
a.cc:35:8: error: conflicting declaration 'std::string S'
35 | string S;
| ^
a.cc:34:5: note: previous declaration as 'int S'
34 | int S;
| ^
a.cc:36:3: error: request for member 'at' in 'S', which is of non-class type 'int'
36 | S.at(5) = ' ';
| ^~
a.cc:37:3: error: request for member 'at' in 'S', which is of non-class type 'int'
37 | S.at(13) = ' ';
| ^~
|
s189120641 | p03834 | Java | mport java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
String b = a.replaceAll(",", " ");
System.out.println(b);
}
}
| Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s413683439 | p03834 | C++ | package E-Haiku;
import java.util.StringTokenizer;
import java.util.Scanner;
public class E-Haiku{
public static void main(String []args){
Scanner scan=new Scanner(System.in);
String s = scan.nextLine();
StringTokenizer s1= new StringTokenizer(s,",");
System.out.print(s1.nextToken()+" ");
System.out.print(s1.nextToken()+ " ");
System.out.print(s1.nextToken());
}} | a.cc:1:1: error: 'package' does not name a type
1 | package E-Haiku;
| ^~~~~~~
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.StringTokenizer;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.util.Scanner;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class E-Haiku{
| ^~~~~~
|
s866307949 | p03834 | C++ | #include <iostream >
using namespace std;
int main() {
char a[20];
cin >> a;
for (int i = 0; i < 20; i++) {
if (i == 5|| i == 13)
cout << " ";
else
cout << a[i];
}
} | a.cc:1:10: fatal error: iostream : No such file or directory
1 | #include <iostream >
| ^~~~~~~~~~~
compilation terminated.
|
s529992423 | p03834 | Java |
package E-Haiku;
import java.util.StringTokenizer;
import java.util.Scanner;
public class E-Haiku{
public static void main(String []args){
Scanner scan=new Scanner(System.in);
String s = scan.nextLine();
StringTokenizer s1= new StringTokenizer(s,",");
System.out.print(s1.nextToken()+" ");
System.out.print(s1.nextToken()+ " ");
System.out.print(s1.nextToken());
}} | Main.java:2: error: ';' expected
package E-Haiku;
^
Main.java:6: error: '{' expected
public class E-Haiku{
^
2 errors
|
s277261595 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char x[7];
char y[5];
char z[7];
char s[1];
cin>>x>>s>>y>>s>>z;
cout<<x<<" "<<y<<" "<<z;
| a.cc: In function 'int main()':
a.cc:9:29: error: expected '}' at end of input
9 | cout<<x<<" "<<y<<" "<<z;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s518878123 | p03834 | Java | import java.util.StringTokenizer;
import java.util.Scanner;
//import java.util.StringTokenizer;
//import javax.swing.JOptionPane;
public class E - Haiku{
public static void main(String []args){
Scanner scan=new Scanner(System.in);
String s = scan.nextLine();
StringTokenizer s1= new StringTokenizer(s,",");
System.out.print(s1.nextToken()+" ");
System.out.print(s1.nextToken()+ " ");
System.out.print(s1.nextToken());
}}
| Main.java:7: error: '{' expected
public class E - Haiku{
^
1 error
|
s120571203 | p03834 | C++ |
import java.util.StringTokenizer;
import java.util.Scanner;
//import java.util.StringTokenizer;
//import javax.swing.JOptionPane;
public class E - Haiku{
public static void main(String []args){
Scanner scan=new Scanner(System.in);
String s = scan.nextLine();
StringTokenizer s1= new StringTokenizer(s,",");
System.out.print(s1.nextToken()+" ");
System.out.print(s1.nextToken()+ " ");
System.out.print(s1.nextToken());
}}
| a.cc:3:1: error: 'import' does not name a type
3 | import java.util.StringTokenizer;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.util.Scanner;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: expected unqualified-id before 'public'
9 | public class E - Haiku{
| ^~~~~~
|
s167536281 | p03834 | Java |
import java.util.StringTokenizer;
import java.util.Scanner;
//import java.util.StringTokenizer;
//import javax.swing.JOptionPane;
public class Eman{
public static void main(String []args){
Scanner scan=new Scanner(System.in);
String s = scan.nextLine();
StringTokenizer s1= new StringTokenizer(s,",");
System.out.print(s1.nextToken()+" ");
System.out.print(s1.nextToken()+ " ");
System.out.print(s1.nextToken());
}}
| Main.java:10: error: class Eman is public, should be declared in a file named Eman.java
public class Eman{
^
1 error
|
s916614632 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{string s;cin>>s;
s[5]=" ";s[13]=" ";
cout<<s;
return 0;} | a.cc: In function 'int main()':
a.cc:5:6: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
5 | s[5]=" ";s[13]=" ";
| ^~~
| |
| const char*
a.cc:5:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
5 | s[5]=" ";s[13]=" ";
| ^~~
| |
| const char*
|
s362086907 | p03834 | C++ | #include<bits/stdc++>
using namespace std;
int main()
{string s;cin>>s;
s[5]=" ";s[13]=" ";
cout<<s;
return 0;} | a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s988717679 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{string s[19];cin>>s;
s[5]=" ";s[13]=" ";
cout<<s;
return 0;} | a.cc: In function 'int main()':
a.cc:4:18: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [19]' {aka 'std::__cxx11::basic_string<char> [19]'})
4 | {string s[19];cin>>s;
| ~~~^~~
| | |
| | std::string [19] {aka std::__cxx11::basic_string<char> [19]}
| std::istream {aka std::basic_istream<char>}
In file included 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/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:4:20: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
4 | {string s[19];cin>>s;
| ^
/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:4:20: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive]
4 | {string s[19];cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:4:20: error: cannot bind rvalue '(short int)((std::string*)(& s))' 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:4:20: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive]
4 | {string s[19];cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:4:20: error: cannot bind rvalue '(short unsigned int)((std::string*)(& s))' 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:4:20: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive]
4 | {string s[19];cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:4:20: error: cannot bind rvalue '(int)((std::string*)(& s))' 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:4:20: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive]
4 | {string s[19];cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:4:20: error: cannot bind rvalue '(unsigned int)((std::string*)(& s))' 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:4:20: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive]
4 | {string s[19];cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:4:20: error: cannot bind rvalue '(long int)((std::string*)(& s))' 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:4:20: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive]
4 | {string s[19];cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:4:20: error: cannot bind rvalue '(long unsigned int)((std::string*)(& s))' 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:4:20: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive]
4 | {string s[19];cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:4:20: error: cannot bind rvalue '(long long int)((std::string*)(& s))' 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:4:20: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive]
4 | {string s[19];cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:4:20: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& s))' 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:4:20: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
4 | {string s[19];cin>>s;
| ^
/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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} 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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} 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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic |
s461692571 | p03834 | C++ | #include<bits/stdc++>
using namespace std;
int main()
{string s[19];cin>>s;
s[5]=" ";s[13]=" ";
cout<<s;
return 0;} | a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s537757127 | p03834 | C++ | #include<iostream>
using namespace std;
int main(){
string s[19];
cin>>s;
s[5]=' ';
s[13]=' ';
cout<<s<<"\n";
}
| a.cc: In function 'int main()':
a.cc:5:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [19]' {aka 'std::__cxx11::basic_string<char> [19]'})
5 | cin>>s;
| ~~~^~~
| | |
| | std::string [19] {aka std::__cxx11::basic_string<char> [19]}
| 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:5:14: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
5 | cin>>s;
| ^
/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:5:14: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive]
5 | cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:14: error: cannot bind rvalue '(short int)((std::string*)(& s))' 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:5:14: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive]
5 | cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:14: error: cannot bind rvalue '(short unsigned int)((std::string*)(& s))' 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:5:14: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive]
5 | cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:14: error: cannot bind rvalue '(int)((std::string*)(& s))' 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:5:14: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive]
5 | cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:14: error: cannot bind rvalue '(unsigned int)((std::string*)(& s))' 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:5:14: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive]
5 | cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:14: error: cannot bind rvalue '(long int)((std::string*)(& s))' 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:5:14: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive]
5 | cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:14: error: cannot bind rvalue '(long unsigned int)((std::string*)(& s))' 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:5:14: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive]
5 | cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:14: error: cannot bind rvalue '(long long int)((std::string*)(& s))' 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:5:14: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive]
5 | cin>>s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:14: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& s))' 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:5:14: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
5 | cin>>s;
| ^
/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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} 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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} 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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} 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 [19]' {aka 'std:: |
s356053299 | p03834 | C++ | #include<iostream>
using namespace std;
int main(){
string s[19];
s[5]=',';
s[13]=','
cin>>s;
cout<<s<<"\n";
} | a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before 'cin'
6 | s[13]=','
| ^
| ;
7 | cin>>s;
| ~~~
|
s617777661 | p03834 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<tuple>
#define int long
using namespace std;
signed main() {
stirng S;
cin >> S;
S.at(5) = ' ';
S.at(13) = ' ';
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'stirng' was not declared in this scope
12 | stirng S;
| ^~~~~~
a.cc:13:16: error: 'S' was not declared in this scope
13 | cin >> S;
| ^
|
s204478543 | p03834 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<tuple>
#define int long
using namespace std;
signed main() {
stirng S;
cin >> S;
S.at(5) = ' ';
S.at(13) = ' ';
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'stirng' was not declared in this scope
12 | stirng S;
| ^~~~~~
a.cc:13:16: error: 'S' was not declared in this scope
13 | cin >> S;
| ^
|
s112010798 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
s[5]=s[13]=" ";
cout<<s<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
7 | s[5]=s[13]=" ";
| ^~~
| |
| const char*
|
s887948952 | p03834 | C++ | #include<stdio.h>
#include<string.h>
int main(void)
{
char s[20];
int k,i;
scanf("%s",s);
k=strlen(s)-1;
i=0;
for(i=0;i<=k;i++) {
if(s[i]==','){
' '=',';
}
}
printf("%s\n",s);
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:25: error: lvalue required as left operand of assignment
12 | ' '=',';
| ^~~
|
s135160658 | p03834 | Java | public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String haiku = scan.next();
System.out.println(haiku.replace(","," "));
scan.close();
}
} | Main.java:3: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s563545378 | p03834 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
s[5] = s[15] = " ";
cout << s;
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
14 | s[5] = s[15] = " ";
| ^~~
| |
| const char*
|
s973593530 | p03834 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin >> s;
cout << substr(0,5) << " " << substr(6,7) << " " << substr(14,5) << endl;
} | a.cc: In function 'int main()':
a.cc:11:11: error: 'substr' was not declared in this scope
11 | cout << substr(0,5) << " " << substr(6,7) << " " << substr(14,5) << endl;
| ^~~~~~
|
s837321366 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
cout<<regex_replace(s,regex(",")," ")<<endl; | a.cc: In function 'int main()':
a.cc:6:47: error: expected '}' at end of input
6 | cout<<regex_replace(s,regex(",")," ")<<endl;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s595662173 | p03834 | C++ | use std::io::*;
fn main(){
let mut s : String = input();
s = s.replace(",", " ");
println!("{}", s);
}
fn input<T>() -> T
where
T: std::str::FromStr,
{
let stdin = std::io::stdin();
let token: String = stdin
.lock()
.bytes()
.map(|c| c.unwrap() as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
.collect();
token.parse().ok().unwrap()
} | a.cc:1:1: error: 'use' does not name a type
1 | use std::io::*;
| ^~~
a.cc:3:1: error: 'fn' does not name a type
3 | fn main(){
| ^~
a.cc:9:1: error: 'fn' does not name a type
9 | fn input<T>() -> T
| ^~
|
s859539176 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define pll pair<ll,ll>
#define INF LLONG_MAX
#define PI acos(-1)
#define MOD 1e9 + 7
#define fir first
#define sec second
#define all(x) x.begin(),x.end()
#define mem(a,b) memset(a,b,sizeof(a))
#define rep(c,a,b) for(ll c=a;c<b;c++)
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int main()
{
//Taken help from code of Akasaransh
IOS
string s;
cin>>s;
for(ll i=0;i<s.size();i++)
{
if(s[i]!=',')
cout<<s[i];
else
cout<<" ";
} | a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
28 | }
| ^
a.cc:17:1: note: to match this '{'
17 | {
| ^
|
s034765681 | p03834 | Java | s = input()
print(s.replace(',', ' ')) | Main.java:1: error: class, interface, enum, or record expected
s = input()
^
1 error
|
s993363298 | p03834 | C | #include<stdio.h>
int main(){
int s,k,a,b,c,cnt=0;
scanf("%d%d", &s, &k);
for(a=0; a<=k; a++){
for(b=0; b<=k; b++){
c=s-a-b;
if(c<=k && c>=0){
cnt+=1;
}
}
}
}
}
printf("%d\n",cnt);
} | main.c:14:3: error: expected identifier or '(' before '}' token
14 | }
| ^
main.c:15:10: error: expected declaration specifiers or '...' before string constant
15 | printf("%d\n",cnt);
| ^~~~~~
main.c:15:17: error: unknown type name 'cnt'; did you mean 'int'?
15 | printf("%d\n",cnt);
| ^~~
| int
main.c:16:1: error: expected identifier or '(' before '}' token
16 | }
| ^
|
s098561636 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
s[5] = " ";
s[13]= " ";
cout << s << endl;
}
| a.cc: In function 'int main()':
a.cc:7:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
7 | s[5] = " ";
| ^~~
| |
| const char*
a.cc:8:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
8 | s[13]= " ";
| ^~~
| |
| const char*
|
s943469357 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b,c;
cin >>a>>','>>b>>','>>c;
cout<<a<<b<<c;
} | a.cc: In function 'int main()':
a.cc:6:12: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and 'char')
6 | cin >>a>>','>>b>>','>>c;
| ~~~~~~~^~~~~
| | |
| | char
| std::basic_istream<char>
In file included 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/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:6:14: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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>]' (near match)
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:14: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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>]' (near match)
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:14: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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>]' (near match)
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:14: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'char'
6 | cin >>a>>','>>b>>','>>c;
| ^~~
/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:6:14: error: invalid conversion from 'char' to 'void*' [-fpermissive]
6 | cin >>a>>','>>b>>','>>c;
| ^~~
| |
| char
a.cc:6:14: error: cannot bind rvalue '(void*)44' to 'void*&'
/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>]' (near match)
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:14: error: invalid conversion from 'char' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive]
6 | cin >>a>>','>>b>>','>>c;
| ^~~
| |
| char
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' (near match)
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:14: error: invalid conversion from 'char' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive]
6 | cin >>a>>','>>b>>','>>c;
| ^~~
| |
| char
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (nea |
s311265096 | p03834 | C | #include <stdio.h>
#include <string.h>
int main(){
char s[20],a[6],b[8],c[6];
scanf("%s",s);
strncpy(a,s,5);
a[5]='\0'
strncpy(b,&s[7],7);
b[7]='\0';
strncpy(c,&s[15],5);
c[5]='\0';
printf("%s %s %s",a,b,c);
return 0;
} | main.c: In function 'main':
main.c:7:12: error: expected ';' before 'strncpy'
7 | a[5]='\0'
| ^
| ;
8 | strncpy(b,&s[7],7);
| ~~~~~~~
|
s575634155 | p03834 | C++ | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <array>
#include <cfloat>
using namespace std;
int main (){
string a;
cin >> a;
a[6]=' ';
a[14]' ';
cout << a;
} | a.cc: In function 'int main()':
a.cc:12:6: error: expected ';' before '\x20'
12 | a[14]' ';
| ^~~
| ;
a.cc:12:5: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
12 | a[14]' ';
| ^
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:1265:7: note: declared here
1265 | operator[](size_type __pos)
| ^~~~~~~~
|
s013939665 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s[19];
cin >> s;
for (int i=0;i<19;i++){
if (s[i]==','){
s[i]=' ';
}
}
cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:5:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [19]' {aka 'std::__cxx11::basic_string<char> [19]'})
5 | cin >> s;
| ~~~ ^~ ~
| | |
| | std::string [19] {aka std::__cxx11::basic_string<char> [19]}
| std::istream {aka std::basic_istream<char>}
In file included 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/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:5:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
5 | cin >> s;
| ^
/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:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive]
5 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:10: error: cannot bind rvalue '(short int)((std::string*)(& s))' 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:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive]
5 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:10: error: cannot bind rvalue '(short unsigned int)((std::string*)(& s))' 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:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive]
5 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:10: error: cannot bind rvalue '(int)((std::string*)(& s))' 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:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive]
5 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:10: error: cannot bind rvalue '(unsigned int)((std::string*)(& s))' 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:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive]
5 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:10: error: cannot bind rvalue '(long int)((std::string*)(& s))' 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:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive]
5 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:10: error: cannot bind rvalue '(long unsigned int)((std::string*)(& s))' 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:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive]
5 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:10: error: cannot bind rvalue '(long long int)((std::string*)(& s))' 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:5:10: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive]
5 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:5:10: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& s))' 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:5:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
5 | cin >> s;
| ^
/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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} 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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} 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 [19]' {aka 'std::__cxx11::basic_string<char> [19]'} 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::strin |
s756900176 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s[19];
for (int i=0;i<19;i++){
if (s[i]==','){
s[i]=' ';
}
}
cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:6:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
6 | if (s[i]==','){
| ~~~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | if (s[i]==','){
| ^~~
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
6 | if (s[i]==','){
| ^~~
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | if (s[i]==','){
| ^~~
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
6 | if (s[i]==','){
| ^~~
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | if (s[i]==','){
| ^~~
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
6 | if (s[i]==','){
| ^~~
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | if (s[i]==','){
| ^~~
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
6 | if (s[i]==','){
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h: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:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
6 | if (s[i]==','){
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/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:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | if (s[i]==','){
| ^~~
/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:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | if (s[i]==','){
| ^~~
/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:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | if (s[i]==','){
| ^~~
/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:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | if (s[i]==','){
| ^~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/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:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
6 | if (s[i]==','){
| ^~~
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:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
6 | if (s[i]==','){
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/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:6:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | if (s[i]==','){
| ^~~
/usr/include/c++ |
s150756532 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)
int main() {
string x;
cin >> x;
cout << x.substr(0, 5) <<" "<<x.substr(6, 7)<<" "<<x.substr(14, 5) endl;
} | a.cc: In function 'int main()':
a.cc:12:73: error: expected ';' before 'endl'
12 | cout << x.substr(0, 5) <<" "<<x.substr(6, 7)<<" "<<x.substr(14, 5) endl;
| ^~~~~
| ;
|
s417850148 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
for(int i=0;i<s.size();i++){
if(i==5||i==12||i==19){
cout<<" "<<endl;
}
else{
cout<<s.at(i)<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' at end of input
15 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s101420788 | p03834 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main() {
char c[100];
scanf("%s", c);
for(int i = 0; i < strlen(c), i++) {
if(c[i] == ',') {
c[i] = ' ';
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:38: error: expected ';' before ')' token
10 | for(int i = 0; i < strlen(c), i++) {
| ^
| ;
|
s717470573 | p03834 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string input_str;
cin >> input_str;
input_str[5] = ' ', input_str[13] = '';
cout << input_str << endl;
return 0;
}
| a.cc:10:41: error: empty character constant
10 | input_str[5] = ' ', input_str[13] = '';
| ^~
|
s494137650 | p03834 | C++ | int main(){
string input_str;
cin >> input_str;
input_str[5] = ' ', input_str[13] = '';
cout << input_str << endl;
return 0;
}
| a.cc:6:41: error: empty character constant
6 | input_str[5] = ' ', input_str[13] = '';
| ^~
a.cc: In function 'int main()':
a.cc:2:5: error: 'string' was not declared in this scope
2 | string input_str;
| ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
4 | cin >> input_str;
| ^~~
a.cc:4:12: error: 'input_str' was not declared in this scope
4 | cin >> input_str;
| ^~~~~~~~~
a.cc:8:5: error: 'cout' was not declared in this scope
8 | cout << input_str << endl;
| ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope
8 | cout << input_str << endl;
| ^~~~
|
s217033684 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin>>s;
s[5] = " ";
s[13] = " ";
cout<<s<<endl;
} | a.cc: In function 'int main()':
a.cc:6:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
6 | s[5] = " ";
| ^~~
| |
| const char*
a.cc:7:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
7 | s[13] = " ";
| ^~~
| |
| const char*
|
s283370082 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,s,ct=0;
int main()
{
cin>>n>>s;
for(int i=0;i<=n;i++) {
for(int j=0;j<=n;j++) {
int p = s-i-j;
if(p >= 0 && p <= n) {
ct++;
}
cout<<ct<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:7:27: note: to match this '{'
7 | for(int i=0;i<=n;i++) {
| ^
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s485044723 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
stirng s;
cin>>s;
for(int i=0;s[i];i++){
if(s[i]==',')s[i]=' ';
cout<<s[i];
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:4:1: error: 'stirng' was not declared in this scope
4 | stirng s;
| ^~~~~~
a.cc:5:6: error: 's' was not declared in this scope
5 | cin>>s;
| ^
|
s904120497 | p03834 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
string s;
cin >> s;
s[5] = " ";
s[13] = " ";
cout << s << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:10: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
8 | s[5] = " ";
| ^~~
| |
| const char*
a.cc:9:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
9 | s[13] = " ";
| ^~~
| |
| const char*
|
s906171239 | p03834 | C | #include<stdio.h>
int main()
{
char s[19];
gets(s);
int a;
s5]=' ';
s[13]=' ';
for(a=0;a<19;a++)
{
printf("%c",s[a]);
}
return 0;
} | main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
5 | gets(s);
| ^~~~
| fgets
main.c:7:5: error: 's5' undeclared (first use in this function); did you mean 's'?
7 | s5]=' ';
| ^~
| s
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:7: error: expected ';' before ']' token
7 | s5]=' ';
| ^
| ;
main.c:7:7: error: expected statement before ']' token
main.c:7:8: error: expected expression before '=' token
7 | s5]=' ';
| ^
|
s965958478 | p03834 | C++ | #include<cstdio>
#include<string.h>
using namespace std;
int main()
{
int i;
char word[1000];
while(gets(word))
{
int len=strlen(word);
for(i=0;i<len;i++)
{
if(word[i]==',')
{
printf("%c",32);
}
else
{
printf("%c",word[i]);
}
}
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:11: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | while(gets(word))
| ^~~~
| getw
|
s673422619 | p03834 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char a[25];
gets(a);
a[5]=32;
a[13]=32;
printf("%s\n",a);
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(a);
| ^~~~
| getw
|
s662946478 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
for(int i:s){
if(i==',')
i = " ";
}
cout << s << endl;
}
| a.cc: In function 'int main()':
a.cc:9:11: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
9 | i = " ";
| ^~~
| |
| const char*
|
s339005740 | p03834 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string T;
cin >> T;
for(int i=0; i<19; i++)
{
if(T[i]==',')
T[i] = ' ';
cout << T[i];
}
| a.cc: In function 'int main()':
a.cc:17:4: error: expected '}' at end of input
17 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s815651347 | p03834 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string T;
cin >> T;
for(int i=0; i<19; i++)
if(T[i]==",")
T[i]==" ";
cout << T;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(T[i]==",")
a.cc:12:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | T[i]==" ";
|
s049077313 | p03834 | C++ | using System;
using System.Linq;
class Program
{
static void Main(string[] args) {
string[] s = Console.ReadLine().Split('.').ToArray();
foreach(string i in s) Console.Write(i + " ");
Console.WriteLine();
}
} | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Linq;
| ^~~~~~
a.cc:6:22: error: 'string' has not been declared
6 | static void Main(string[] args) {
| ^~~~~~
a.cc:6:31: error: expected ',' or '...' before 'args'
6 | static void Main(string[] args) {
| ^~~~
a.cc:11:2: error: expected ';' after class definition
11 | }
| ^
| ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:7:9: error: 'string' was not declared in this scope
7 | string[] s = Console.ReadLine().Split('.').ToArray();
| ^~~~~~
a.cc:7:16: error: expected primary-expression before ']' token
7 | string[] s = Console.ReadLine().Split('.').ToArray();
| ^
a.cc:8:24: error: expected ')' before 'i'
8 | foreach(string i in s) Console.Write(i + " ");
| ^
a.cc:8:16: note: to match this '('
8 | foreach(string i in s) Console.Write(i + " ");
| ^
a.cc:8:9: error: 'foreach' was not declared in this scope
8 | foreach(string i in s) Console.Write(i + " ");
| ^~~~~~~
a.cc:9:9: error: 'Console' was not declared in this scope
9 | Console.WriteLine();
| ^~~~~~~
|
s892355667 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
string s(19);
for(int i=0;i<s.size();i++){
s.at(5)=' ';
s.at(13)=' ';
}
cout>>s>>endl;
} | a.cc: In function 'int main()':
a.cc:6:14: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
6 | string s(19);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
/usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
149 | using _If_sv = enable_if_t<
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:797:30: required from here
797 | template<typename _Tp, typename = _If_sv<_Tp, void>>
| ^~~~~~~~
/usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
788 | basic_string(const _Tp& __t, size_type __pos, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
765 | basic_string(_InputIterator __beg, _InputIterator __end,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed:
a.cc:6:12: note: cannot convert '19' (type 'int') to type 'const char*'
6 | string s(19);
| ^~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
721 | basic_string(basic_string&& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
716 | basic_string(const basic_string& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<char>'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
682 | basic_string(basic_string&& __str) noexcept
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>&&'
682 | basic_string(basic_string&& __str) noexcept
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
624 | basic_string(const _CharT* __s, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
604 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
586 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
569 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
552 | basic_string(const basic_string& __str)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'int' to 'const std::__cxx11::basic_string<char>&'
552 | basic_string(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:540:34: note: no known conversion for argument 1 from 'int' to 'const std::allocator<char>&'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std |
s187317687 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
string s;
char *str=&s.at(6);
char *str2=&s.at(14);
for(int i=0;i<s.size();i++){
*str=' ';
*str2=' ';
}
cout>>s>>endl;
} | a.cc: In function 'int main()':
a.cc:13:7: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
13 | cout>>s>>endl;
| ~~~~^~~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:13:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
13 | cout>>s>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
In file included from /usr/include/c++/14/istream:1109,
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:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::__cxx11::basic_string<char>&]':
a.cc:13:9: required from here
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _T |
s152113827 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
string s;
string *str=&s.at(6);
string *str2=&s.at(14);
for(int i=0;i<s.size();i++){
*str=' ';
*str2=' ';
}
cout>>s>>endl;
} | a.cc: In function 'int main()':
a.cc:7:15: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*' {aka 'char*'} to 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} in initialization
7 | string *str=&s.at(6);
| ^~~~~~~~
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type* {aka char*}
a.cc:8:16: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*' {aka 'char*'} to 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} in initialization
8 | string *str2=&s.at(14);
| ^~~~~~~~~
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type* {aka char*}
a.cc:13:7: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
13 | cout>>s>>endl;
| ~~~~^~~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:13:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
13 | cout>>s>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
In file included from /usr/include/c++/14/istream:1109,
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:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::__cxx11::basic_string<char>&]':
a.cc:13:9: required from here
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
13 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:13:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Trai |
s630957179 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
string s;
char &str=s.at(6),%str2=s.at(14);
for(int i=0;i<s.size();i++){
str=' '; str2=' ';
}
cout>>s>>endl;
} | a.cc: In function 'int main()':
a.cc:7:21: error: expected unqualified-id before '%' token
7 | char &str=s.at(6),%str2=s.at(14);
| ^
a.cc:9:14: error: 'str2' was not declared in this scope; did you mean 'str'?
9 | str=' '; str2=' ';
| ^~~~
| str
a.cc:11:7: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
11 | cout>>s>>endl;
| ~~~~^~~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:11:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
11 | cout>>s>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
In file included from /usr/include/c++/14/istream:1109,
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:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::__cxx11::basic_string<char>&]':
a.cc:11:9: required from here
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout>>s>>endl;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:11:9: note: 'std::ostream' {aka 'std: |
s249472405 | p03834 | C++ | tr ',' ' ' | a.cc:1:1: error: 'tr' does not name a type
1 | tr ',' ' '
| ^~
|
s558418619 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
std::cin >> s;
s[5]=' ';
s[13]happy,newyear,enjoy=' ';
std::cout << s << std::endl;
} | a.cc: In function 'int main()':
a.cc:8:10: error: expected ';' before 'happy'
8 | s[13]happy,newyear,enjoy=' ';
| ^~~~~
| ;
a.cc:8:9: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
8 | s[13]happy,newyear,enjoy=' ';
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1265:7: note: declared here
1265 | operator[](size_type __pos)
| ^~~~~~~~
|
s540401727 | p03834 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
char haiku[19];
cin >> haiku;
for (int i=0;i<19;i++){
if (haiku[i]==','){
haiku[i] = ' ';
}
cout << haiku[i];
}
endl;
} | a.cc: In function 'int main()':
a.cc:13:7: error: statement cannot resolve address of overloaded function
13 | endl;
| ^
|
s833719017 | p03834 | C++ | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
s.at(5) = " ";
s.at(13) = " ";
cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:6:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
6 | s.at(5) = " ";
| ^~~
| |
| const char*
a.cc:7:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
7 | s.at(13) = " ";
| ^~~
| |
| const char*
|
s806547700 | p03834 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string a,b,c;
cin>>a;
cout<<a[0:5]<<" "<<a[6:13]<<" "<<a[14:19]<<endl;
} | a.cc: In function 'int main()':
a.cc:7:12: error: expected ']' before ':' token
7 | cout<<a[0:5]<<" "<<a[6:13]<<" "<<a[14:19]<<endl;
| ^
| ]
a.cc:7:12: error: expected ';' before ':' token
7 | cout<<a[0:5]<<" "<<a[6:13]<<" "<<a[14:19]<<endl;
| ^
| ;
|
s726717425 | p03834 | C++ | #include<iostream>
#include<string>
#include <algorithm>
using namespace std;
int main()
{
string s;
cin >> s ;
replace(s.begin(), s.end(),","," ");
cout << s << endl;
} | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::replace(_FIter, _FIter, const _Tp&, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Tp = char [2]]':
a.cc:10:12: required from here
10 | replace(s.begin(), s.end(),","," ");
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4293:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
4293 | if (*__first == __old_value)
| ~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4294:20: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
4294 | *__first = __new_value;
| ~~~~~~~~~^~~~~~~~~~~~~
| |
| const char*
|
s189605481 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<char> vec(19);
for (int i = 0; i < 19; i++) {
cin >> vec.at(i);
}
vec.at(5)=' ';
vec.at(13)=' ';
for (int i = 0; i < 19; i++) {
cout << vec(i);}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:13:14: error: no match for call to '(std::vector<char>) (int&)'
13 | cout << vec(i);}
| ~~~^~~
|
s797809314 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<char> vec(19);
for (int i = 0; i < 19; i++) {
cin >> vec.at(i);
}
vec.at(6)=' ';
vec.at(14)=' ';
for (int i = 0; i < 19; i++) {
cout << vec(19);}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:13:14: error: no match for call to '(std::vector<char>) (int)'
13 | cout << vec(19);}
| ~~~^~~~
|
s620187296 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<char> vec(19);
for (int i = 0; i < 19; i++) {
cin >> vec.at(i);
}
vec.at(6)=' ';
vec.at(14)=' ';
cout << vec(19)<<endl;
}
| a.cc: In function 'int main()':
a.cc:13:14: error: no match for call to '(std::vector<char>) (int)'
13 | cout << vec(19)<<endl;
| ~~~^~~~
|
s738645231 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<char> vec(19);
for (int i = 0; i < 19; i++) {
cin >> vec.at(i);
}
vec.at(6)=' '
vec.at(14)=' '
cout << vec(19)<<endl;
}
| a.cc: In function 'int main()':
a.cc:9:22: error: expected ';' before 'vec'
9 | vec.at(6)=' '
| ^
| ;
10 | vec.at(14)=' '
| ~~~
|
s493839443 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
s.at(5) == " ";
s.at(13) == " ";
cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:7:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | s.at(5) == " ";
| ~~~~~~~~^~~~~~
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | s.at(13) == " ";
| ~~~~~~~~~^~~~~~
|
s319748156 | p03834 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <ios>
#include <iomanip>
using namespace std;
#define N_MAX (100000)
#define LL_MAX_NUM (1LL<<60)
#define INF 1e7
typedef long long ll;
typedef long long int lli;
int main() {
string S;
cin >> S;
S[5] = S[13] = " ";
cout << S << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:26:25: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
26 | S[5] = S[13] = " ";
| ^~~
| |
| const char*
|
s749974547 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A;
cin>>A;
A[5]="";
A[13]="";
cout <<A;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
7 | A[5]="";
| ^~
| |
| const char*
a.cc:8:9: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
8 | A[13]="";
| ^~
| |
| const char*
|
s124801277 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string A;
cin>>A;
A[5]='';
A[13]='';
cout <<A;
return 0;
}
| a.cc:7:8: error: empty character constant
7 | A[5]='';
| ^~
a.cc:8:9: error: empty character constant
8 | A[13]='';
| ^~
|
s145771188 | p03834 | C++ | #include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <bitset>
#include <deque>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <iterator>
#include <string>
#include <cctype>
#include <stdio.h>
using namespace std;
int main(){
string S;cin>>S;
string[5]=" ";string[13]=" ";
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:23:10: error: expected identifier before numeric constant
23 | string[5]=" ";string[13]=" ";
| ^
a.cc:23:10: error: expected ']' before numeric constant
23 | string[5]=" ";string[13]=" ";
| ^
| ]
a.cc:23:9: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
23 | string[5]=" ";string[13]=" ";
| ^
a.cc:23:9: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:23:9: error: empty structured binding declaration
a.cc:23:24: error: expected identifier before numeric constant
23 | string[5]=" ";string[13]=" ";
| ^~
a.cc:23:24: error: expected ']' before numeric constant
23 | string[5]=" ";string[13]=" ";
| ^~
| ]
a.cc:23:23: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
23 | string[5]=" ";string[13]=" ";
| ^
a.cc:23:23: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:23:23: error: empty structured binding declaration
|
s910983185 | p03834 | C++ | #include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <bitset>
#include <deque>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <iterator>
#include <string>
#include <cctype>
#include <stdio.h>
using namespace std;
int main(){
string = S;cin>>S;
string[5]=" ";string[13]=" ";
cout << S << endl;
} | a.cc: In function 'int main()':
a.cc:22:12: error: expected unqualified-id before '=' token
22 | string = S;cin>>S;
| ^
a.cc:22:21: error: 'S' was not declared in this scope
22 | string = S;cin>>S;
| ^
a.cc:23:10: error: expected identifier before numeric constant
23 | string[5]=" ";string[13]=" ";
| ^
a.cc:23:10: error: expected ']' before numeric constant
23 | string[5]=" ";string[13]=" ";
| ^
| ]
a.cc:23:9: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
23 | string[5]=" ";string[13]=" ";
| ^
a.cc:23:9: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:23:9: error: empty structured binding declaration
a.cc:23:24: error: expected identifier before numeric constant
23 | string[5]=" ";string[13]=" ";
| ^~
a.cc:23:24: error: expected ']' before numeric constant
23 | string[5]=" ";string[13]=" ";
| ^~
| ]
a.cc:23:23: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
23 | string[5]=" ";string[13]=" ";
| ^
a.cc:23:23: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:23:23: error: empty structured binding declaration
|
s077813597 | p03834 | C++ | #include <iostream>
using namespace std;
int main(){
string s;
cin>>s;
for(int i=0;i<s.size();i++){
if(s.at(i)==',')s.at(i)==' '<<endl;
}
cout<<s<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:33: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | if(s.at(i)==',')s.at(i)==' '<<endl;
| ~~~^~~~~~
|
s262639566 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
char kami[6];
char naka[8];
char simo[6];
for (int i = 0; i < 5; ++i)
{
kami[i] = S[i];
}
for (int i = 6; i < 7 + 6 + ; ++i)
{
naka[i - 6] = S[i];
}
for (int i = 14; i < 5 + 14; ++i)
{
simo[i - 14] = S[i];
}
cout << kami << " " << naka << " " << simo << endl;
} | a.cc: In function 'int main()':
a.cc:13:37: error: expected primary-expression before ';' token
13 | for (int i = 6; i < 7 + 6 + ; ++i)
| ^
|
s312840899 | p03834 | C++ | #include<iostream>
#include<string>
#include <algorithm>
using namespace std;
int main()
{
string s;
cin >> s;
s.replace(",", " ");
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:12: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(const char [2], const char [2])'
9 | s.replace(",", " ");
| ~~~~~~~~~^~~~~~~~~~
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:2413:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2413 | replace(const_iterator __i1, const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2522 | replace(size_type __pos, size_type __n, const _Tp& __svt)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2540 | replace(size_type __pos1, size_type __n1, const _Tp& __svt,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2562 | replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2200 | replace(size_type __pos, size_type __n, const basic_string& __str)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2223 | replace(size_type __pos1, size_type __n1, const basic_string& __str,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate expects 5 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2249 | replace(size_type __pos, size_type __n1, const _CharT* __s,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2275 | replace(size_type __pos, size_type __n1, const _CharT* __s)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2300 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2319 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]'
2340 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2363 | replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]'
2385 | replace(__const_iterator __i1, __const_iterator __i2, size_type __n,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, _CharT*, _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2444 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2456 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, iterator, iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; iterator = std::__cxx11::basic_string<char>::iterator]'
2468 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2480:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __ |
s790867293 | p03834 | C++ | #include<iostream>
#include<string>
#include <algorithm>
using namespace std;
int main()
{
string s;
cin >> s;
s.replace(',', ' ');
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:12: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(char, char)'
9 | s.replace(',', ' ');
| ~~~~~~~~~^~~~~~~~~~
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:2413:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2413 | replace(const_iterator __i1, const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2522 | replace(size_type __pos, size_type __n, const _Tp& __svt)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2540 | replace(size_type __pos1, size_type __n1, const _Tp& __svt,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2562 | replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2200 | replace(size_type __pos, size_type __n, const basic_string& __str)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2223 | replace(size_type __pos1, size_type __n1, const basic_string& __str,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate expects 5 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2249 | replace(size_type __pos, size_type __n1, const _CharT* __s,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2275 | replace(size_type __pos, size_type __n1, const _CharT* __s)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2300 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2319 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]'
2340 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2363 | replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]'
2385 | replace(__const_iterator __i1, __const_iterator __i2, size_type __n,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, _CharT*, _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2444 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2456 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, iterator, iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; iterator = std::__cxx11::basic_string<char>::iterator]'
2468 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2480:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, cons |
s802677813 | p03834 | C++ | #include<iostream>
#include<string>
#include <algorithm>
using namespace std;
int main()
{
string s;
cin >> s;
s.replace(',', ' ')
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:12: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(char, char)'
9 | s.replace(',', ' ')
| ~~~~~~~~~^~~~~~~~~~
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:2413:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2413 | replace(const_iterator __i1, const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2522 | replace(size_type __pos, size_type __n, const _Tp& __svt)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2540 | replace(size_type __pos1, size_type __n1, const _Tp& __svt,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2562 | replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2200 | replace(size_type __pos, size_type __n, const basic_string& __str)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2223 | replace(size_type __pos1, size_type __n1, const basic_string& __str,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate expects 5 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2249 | replace(size_type __pos, size_type __n1, const _CharT* __s,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2275 | replace(size_type __pos, size_type __n1, const _CharT* __s)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2275:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2300 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2319 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]'
2340 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2363 | replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]'
2385 | replace(__const_iterator __i1, __const_iterator __i2, size_type __n,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2385:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, _CharT*, _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2444 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2444:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2456 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2456:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, iterator, iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; iterator = std::__cxx11::basic_string<char>::iterator]'
2468 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2468:7: note: candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/basic_string.h:2480:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const |
s640327657 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
s[6]=s[14]=' '
cout << s << endl;
}
| a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'cout'
7 | s[6]=s[14]=' '
| ^
| ;
8 | cout << s << endl;
| ~~~~
|
s750185209 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
s[5] = s[14] = ' ';
cout >> s;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
8 | cout >> s;
| ~~~~ ^~ ~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:8:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
8 | cout >> s;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
In file included from /usr/include/c++/14/istream:1109,
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:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::__cxx11::basic_string<char>&]':
a.cc:8:13: required from here
8 | cout >> s;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> s;
| ^
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& |
s598403977 | p03834 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
string s1;
cin >> s1;
s1.replace(1,5,' ');
s1.replace(5,7,' ');
cout << s1;
} | a.cc: In function 'int main()':
a.cc:7:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(int, int, char)'
7 | s1.replace(1,5,' ');
| ~~~~~~~~~~^~~~~~~~~
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:2275:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (near match)
2275 | replace(size_type __pos, size_type __n1, const _CharT* __s)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2275:7: note: conversion of argument 3 would be ill-formed:
a.cc:7:20: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
7 | s1.replace(1,5,' ');
| ^~~
| |
| char
/usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2413 | replace(const_iterator __i1, const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2413:9: note: candidate expects 4 arguments, 3 provided
/usr/include/c++/14/bits/basic_string.h:2522:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2522 | replace(size_type __pos, size_type __n, const _Tp& __svt)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2522:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = std::__cxx11::basic_string<char>&]':
/usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = char; _Res = std::__cxx11::basic_string<char>&; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
149 | using _If_sv = enable_if_t<
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:2522:2: required by substitution of 'template<class _Tp> std::__cxx11::basic_string<char>::_If_sv<_Tp, std::__cxx11::basic_string<char>&> std::__cxx11::basic_string<char>::replace(size_type, size_type, const _Tp&) [with _Tp = char]'
2522 | replace(size_type __pos, size_type __n, const _Tp& __svt)
| ^~~~~~~
a.cc:7:15: required from here
7 | s1.replace(1,5,' ');
| ~~~~~~~~~~^~~~~~~~~
/usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, std::__cxx11::basic_string<char>&>'
2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _Tp&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2540 | replace(size_type __pos1, size_type __n1, const _Tp& __svt,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2540:9: note: candidate expects 4 arguments, 3 provided
/usr/include/c++/14/bits/basic_string.h:2562:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(const_iterator, const_iterator, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
2562 | replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2562:9: note: template argument deduction/substitution failed:
a.cc:7:16: note: cannot convert '1' (type 'int') to type 'std::__cxx11::basic_string<char>::const_iterator'
7 | s1.replace(1,5,' ');
| ^
/usr/include/c++/14/bits/basic_string.h:2200:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2200 | replace(size_type __pos, size_type __n, const basic_string& __str)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2200:67: note: no known conversion for argument 3 from 'char' to 'const std::__cxx11::basic_string<char>&'
2200 | replace(size_type __pos, size_type __n, const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2223 | replace(size_type __pos1, size_type __n1, const basic_string& __str,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2223:7: note: candidate expects 5 arguments, 3 provided
/usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2249 | replace(size_type __pos, size_type __n1, const _CharT* __s,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2249:7: note: candidate expects 4 arguments, 3 provided
/usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
2300 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2300:7: note: candidate expects 4 arguments, 3 provided
/usr/include/c++/14/bits/basic_string.h:2319:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2319 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2319:32: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>::__const_iterator' {aka 'std::__cxx11::basic_string<char>::const_iterator'}
2319 | replace(__const_iterator __i1, __const_iterator __i2,
| ~~~~~~~~~~~~~~~~~^~~~
/usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator; size_type = long unsigned int]'
2340 | replace(__const_iterator __i1, __const_iterator __i2,
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:2340:7: note: candidate expects 4 arguments, 3 provided
/usr/include/c++/14/bits/basic_string.h:2363:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]'
2363 | replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s)
| ^~~~~~~
/u |
s274467958 | p03834 | C++ | #include <iostream>
int main() {
string s1;
cin >> s1;
s1.replace(1,5,' ');
s1.replace(5,7,' ');
cout << s1;
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
3 | string s1;
| ^~~~~~
a.cc:3:5: 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:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin >> s1;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:4:12: error: 's1' was not declared in this scope
4 | cin >> s1;
| ^~
a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout << s1;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s020582350 | p03834 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char s[128];
cin>>s;
s[5]=" ";
s[13]=" ";
cout<<s<<endl;
} | a.cc: In function 'int main()':
a.cc:6:8: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
6 | s[5]=" ";
| ^~~
| |
| const char*
a.cc:7:9: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
7 | s[13]=" ";
| ^~~
| |
| const char*
|
s389783654 | p03834 | C++ | #include <bits/stdc++.h>
#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define bit(x) (1L << (x))
using ll = long long;
using namespace std;
template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
template<typename T,typename V>
typename enable_if<is_class<T>::value==0>::type
fill_v(T &t,const V &v){t=v;}
template<typename T,typename V>
typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t,const V &v){
for(auto &e:t) fill_v(e,v);
}
int main() {
string s; cin >> s;
REP(i, n)if(s[i] == ',') s[i] = ' ';
cout << s << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:29:10: error: 'n' was not declared in this scope
29 | REP(i, n)if(s[i] == ',') s[i] = ' ';
| ^
a.cc:2:40: note: in definition of macro 'FOR'
2 | #define FOR(i, a, b) for(int i=(a); i<(b); i++)
| ^
a.cc:29:3: note: in expansion of macro 'REP'
29 | REP(i, n)if(s[i] == ',') s[i] = ' ';
| ^~~
|
s890916825 | p03834 | C++ | #include <iostream>
using namespace std;
int main(){
strihg s;
cin >> s;
for(int i=0;i<s.size();i++){
if(s.at(i)==','){
s.at(i)=' ';
}
}
cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'strihg' was not declared in this scope
5 | strihg s;
| ^~~~~~
a.cc:6:10: error: 's' was not declared in this scope
6 | cin >> s;
| ^
|
s269637422 | p03834 | C | #include <stdio.h>
int main(void){
char a[100];
int count;
scanf("%s",&a);
for(count=0;a[count]='\0';count++){
if(a[count]==','){a[count]=' ';}
}
printf("%s",s);
return 0;
} | main.c: In function 'main':
main.c:9:15: error: 's' undeclared (first use in this function)
9 | printf("%s",s);
| ^
main.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
|
s984495396 | p03834 | C | #include <stdio.h>
int main(void){
char a[100];
int count;
scanf("%s",&a);
for(count=0;a[count]='\0';count++){
if(a[count]==","){a[count]=" ";}
}
printf("%s",s);
return 0;
} | main.c: In function 'main':
main.c:7:14: warning: comparison between pointer and integer
7 | if(a[count]==","){a[count]=" ";}
| ^~
main.c:7:29: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
7 | if(a[count]==","){a[count]=" ";}
| ^
main.c:9:15: error: 's' undeclared (first use in this function)
9 | printf("%s",s);
| ^
main.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
|
s520937975 | p03834 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin >> a;
a[5]=" ";
a[13]=" ";
cout << a << endl;
} | a.cc: In function 'int main()':
a.cc:7:8: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
7 | a[5]=" ";
| ^~~
| |
| const char*
a.cc:8:9: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
8 | a[13]=" ";
| ^~~
| |
| const char*
|
s717517199 | p03834 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(void){
string s;
cin >> s;
replace(s.begin(), s.end(), ',', ' ');
cout << s << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:3: error: 'replace' was not declared in this scope
9 | replace(s.begin(), s.end(), ',', ' ');
| ^~~~~~~
|
s401996847 | p03834 | C | #include <iostream>
#include <string>
int main () {
std::string s;
std::cin >> s;
std::replace(s.begin(), s.end(), ',', ' ');
std::cout << s << std::endl;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s925463378 | p03834 | C | #include <iostream>
#include <string>
int main () {
std::string s;
std::cin >> s;
std::replace(s.begin(), s.end(), ',', ' ');
std::cout << s << std::endl;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.