I am writing a program that creates word search puzzles... i load the words from a file as a string into an array string words[k] i need to know how i can break these words down into their individual characters and also if i can measure how many characters are in the string is there some way that i can do this?
so what i would have to do is import the array with the string in it... take the element of the array i am using and set it to its own string... i dont have my laptop because i am on campus waiting for class so it would be like this i guess.
1 2 3 4 5 6
string stringstuffs(const string words[], constint i, int& size){//size is the size of the
string currentword; //word currently being worked with
currentword = words[i];
size=currentword.size();
return currentword;
}
and that module would then give me the size by reference and the string class seems to just be an array anyways so i would have everything i need to go about putting the word in the puzzle character by character. Awesome man thanks i think the hardest thing i have to do now is test if the characters in the words match!