how to use string::find to look for a word rather each character seperately

Posted by RubyKing on Game Development See other posts from Game Development or by RubyKing
Published on 2012-04-02T11:07:10Z Indexed on 2012/04/02 11:44 UTC
Read the original article Hit count: 245

Filed under:

Hello how would I look through a string for a word rather then each character in that word.

I have my code here and it always seems to find everything that is .obj even if its o or b or j or "."

is there anyway to get passed this

here is my code?

I checked the docuementation here link but nothing returned any results I craved so hard

 string &str = *it;

 if(it->find(".obj"))
 {

 cout << "Found .Obj" << endl;

 }

I also tried to use string::compare but that failed :(

© Game Development or respective owner

Related posts about c++