The difference between operations:
- string s; s[0]= 'a'; cout<<s; gives nothing as output.
- string s; s+= 'a'; cout<<s; output: 'a'.
- string s= " "; s[0]= 'a'; will also print 'a'
Can anyone please explain this behaviour ?
The difference between operations:
Can anyone please explain this behaviour ?