i am trying to create a function that i can put in my program but i have got myself stuck.
basically i have a string that contains letters. for example 'gototheshopatnoon'. from that string i need to transfer all the letters to another array and discard any duplicate letters. so once ive done that the string would look like 'gothespan'. so i only have each letter appearing once. (iam not sure if i explained that good enough)
for some reason i just cant get my head around the problem. i can solve the problem in my head easily but when iam trying to put it in code i just cant work it out.
the only way i cant think of doing this it to get string and compare the position next to it. if its the same then delete that position. if it isnt compare the next position on. once it compared to the end of the string get the second position in the array and compare that to all positions then get the 3rd positon in the string and do the same etc . but that way sounds crap and i dont undertsand how i would even program that
could some one help me?
Edited 6 Years Ago by lethal.b: n/a