For example, I got an input from the user "This is a sample program" using cin, I want to replace every white space with a special char and display it back like "This\is\a\sample\program".
note: special character can be anything. ex: * or & or $ etc....
I want to do this using stream manipulator. is it possible?
Aucun commentaire:
Enregistrer un commentaire