I have the following array
char myArray[] = {"H4w6m1ny6pr4gr1mm2rs6d42s63t6t1k26t46ch1ng2616l3ght6b5lb?6N4n2,6th1t’s616h1rdw1r26pr4bl2m"}; and want to replace specific characters from it, H to 1, or all m's to J. I know I have to use a loop, but how do I do to replace multiple letters with whatever I want? I could go and myArray[0] = 'J' but replacing each position individually doesn't seem efficient to me. Any ideas?
Aucun commentaire:
Enregistrer un commentaire