C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 7th, 2004, 02:48 PM
webmanc webmanc is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 4 webmanc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 51 sec
Reputation Power: 0
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])
{

{
}
}

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > newbie question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT