core[i] == 'T' and same for P??
No, core[i] == 'R'. The next one needs to be 'T'.
oh, do you mean, core[i++]?
seems to work now, but i need to see if the next character is a digit after the TCode:case 'R': i++; if(core[i]=='P'){ i++; } if(core[i]=='T'){ printf("RPT"); }
Last edited by bigmac(rexdale); 01-14-2008 at 04:27 PM.
thats what i need to find out, if its a digit and how long the digit is. (the number that comes after RPT)
for the RTP, i have to use the 8 1's/0's that come before RTP, so a code like this 01010101 RPT2 would mean i have to use the 8 1's 0's (01010101) before RPT and do it 2 times. but the problem is i also have to be able to find the 8 1's 0's before the RPT with other characters like A or b or 9.
^^can someone help, been trying ever since and still i cant get it
Please post your current code.
to check if a character is between 1 and 9 you would have to write;
core[i + 3] >= '1' && core[i + 3] <= '9'
and you are at least detecting at that point whether the core array is holding a character from 1 to 9
at the certain point in the array