Hello, I'm trying to find the second space inside a array, here's my code:
seams that any space is found then reach the end of the array then abort.Code:Space=0; PL=12; //came from another function that is working right! PB=0; // find PartB from start of numbers until 2nd space while (Space!=2) { PartB[PB]=NewStr[PL]; if (PartB[PB]==" "){ Space++; } PB++; PL++; } PartB[PB]='\0'; //close string
but HAVE more than 2 spaces in the string!
thanks!