0
How can I replaced characters in string ?like from"almasa"to "alma*a"
11 Answers
+ 1
Pls mention the language name in tags where you Have written fa
+ 1
There are several ways, but you can use the string replace function.
http://www.cplusplus.com/reference/string/string/replace/
+ 1
Thank you very much
+ 1
It's work finally thanksđ
0
C++
0
I have change the last three letters .
String a;
Cin>>a;
e=a.size();
h=e-3;
for(int x=0;x>=e;x++)
if(a[x]<=h)
a[x];
else
a[x]="*";
Cout<<a;
What I get wrong pls help me
0
The question is user inter name and replace the last three letters to * with functions, what can I do to replace ? I used for to inter for each element in array and if to replace to *.
0
Thanks