Sir pls tell whats the error in this code

hello @Vaibhav277
use c string in place of c++ string , because c++ string size is fixed and for every right shift of characters u need to change the string size.
here is ur updated code ->

okay…thank you sir…