This code is showing error.
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
s="b"+"k"+"4";
cout<<s<<endl;
return 0;
}
This code is working properly.
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
string s1 = "a";
s=s1+"b"+"k"+"4";
cout<<s<<endl;
return 0;
}
I don't know why this is happening, in both the cases i am using strings?
Aucun commentaire:
Enregistrer un commentaire