Just wondering if there is a way i can use CodeBlocks debugger to display all the tokens in 'tokens' if i setup strtok as
Code:tokens = strtok (linebuffer, delims);
Just wondering if there is a way i can use CodeBlocks debugger to display all the tokens in 'tokens' if i setup strtok as
Code:tokens = strtok (linebuffer, delims);
What do you mean? Just set up watches for variables and step through the program using the debugger and it should tell you what the variable contains.
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
Yeh i realise that, but i was just wondering if there was a way to see all tokens at once. Not one after another. Np i have fixed my bug. It seems that the values are stored Globally so you can't have two token list at the same time.
Last edited by CommonTater; 05-15-2011 at 02:52 AM.