Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Searching for character arrays

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2004
    Posts
    13

    Searching for character arrays

    So another problem. I have a hierachy of objects and they all have names such as 'cube' etc but now i need to search through to get to this object but i dont have a clue how to search for this character array. I know how to search through the hiearchy its just i dont know how to find a certain string. Does this make sense?? my brains on a complete shutdown today agh!

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Searching for character arrays

    Code :
    if (strcmp(searchedName,name[i])==0) {
       // found !!
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •