| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
newbie question
i have two vectors i am trying to compare the first is a string vector and the other is a char vector. i am trying to find for example the word hello in the grid vector and i can find the fist char but i dont know how to move or set up a loop to check all the possible directions for the next char in the string. here is a bit of my code. Once the first char is found i need to find the next which the next char could be in 9 possible directions.
-String Vector- 01234 0hello 1apple 2car 3me 4men 5ran 6woman -Grid Vector- 01234 0cenad 1aatps 2rnrpj 3hello 4wmneo /*------------------- A Word Checker ----------------------*/ for(int i=0; i < GridVector.size(); i++) { for(int j=0; j < GridVector.size(); j++) { if(StringVector[0][0] == GridVector[i][j]) { { } } |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > newbie question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|