I have a string which is empty initially.Then I added characters to it.
string s="";
s=s+'a';
it works fine in my pc but getting error in codeforces submission because it prints garbage at the end of hathe printed string.
Same things happen I use vector of char.In that case I use push_back method to add chars.But it still prints garbage in codeforces submission.
vector<char>vc;
vc.push_back('a')
Why is tha happening?