Generation

generate functionSun, 13 Nov 2022

find the first letter inside a string and replace it with "dogs"

void replace_dog(string &s) { char firstLetter= s[0]; s.replace(0, 1, "dogs"); }

Want to kickstart your project?Use the new AI Studio to create your code