+ 5
Program to replace every spaces in a string with hypen
2 Answers
+ 3
https://code.sololearn.com/cqq9BeGF86Qm/#cpp
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main() {
string myString = "This is a string.";
replace(myString.begin(), myString.end(), ' ', '-');
cout << myString;
return 0;
}
:::: OUTPUT ::::
This-is-a-string.
+ 1
plzz...help...to solve this question