Hello, I want to search for a string inside one array, and get the position (index) of the first (or last) char when this was found... I tryed this searching for "play":
but didn't work! I tryed before this:Code:while (i<(TamNew-5)){ //find if this is a spawn class if((NewStr[i]=="p")&&(NewStr[i+1]=="l")&&(NewStr[i+2]=="a")&&(NewStr[i+3]=="y")) { p=i; break; } i++; }
but P return the mem address, not the array index that I need!Code:char *p; p = strstr(NewStr, "play");
any clues?
thanks!!!