+ 2
how to set all the spaces in a string to @ or any other character
2 Respostas
+ 4
Set all the spaces in a string to @, visit:
https://code.sololearn.com/cj9oWmRA82Jj/?ref=app
+ 4
create a for loop. Example below.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string password = "helloworld";
for(unsigned int i = 0; i < password.length(); i++)
{
password[i] = '@';
}
return 0;
}