Question:
I have to create a link list of strings and then every single letter has to be separated into a link list for example.
if I enter two words like "good" and "bad" those have to be in a link list. I know how to do it, but then I have to make a link list every letter of one of the word for example
"good" has to be in a link list
g,o,o,d,
I need help to separate every letter of the word (string) then I know how to link listed them.
thanks for any help..
for(int i = 0; i < word.length(); i++)
{
cout << newWord->name;
newWord->next = head;
head = newWord;
}
the first print, prints the whole word then it prints the whole word minos the first character for example:
if the word is cat
when i = 0
it prints "cat"
when i = 1
it prints "at"
when i = 1
it prints "t"
I have to permute a link list of a string let say for example if the word is "CAT"
I have to enter a string type "CAT"
then create a link list with the word "CAT" so every pointer will point to each letter "C" "A" "T" then permute them