Forum: C Aug 19th, 2008 |
| Replies: 4 Views: 1,800 strtok ignores empty fields. Edward would recommend using another solution, like strcspn and some method of reading or copying a substring:
#include <stdio.h>
#include <string.h>
int main()
{... |
Forum: C Aug 16th, 2008 |
| Replies: 2 Views: 388 break from the inner loop and then continue from the outer loop. If there's more to the body, you may need a flag or something similar:
while (condition) {
int nextIteration = 0;
while... |
Forum: C Aug 15th, 2008 |
| Replies: 6 Views: 2,506 EOF doesn't have an ASCII value, it's required to be negative:
#include <stdio.h>
int main()
{
printf("%d\n", EOF);
return 0;
} |
Forum: C May 17th, 2008 |
| Replies: 2 Views: 773 Edward isn't an expert on getch, but isn't the very definition of getch to read unbuffered input directly from the keyboard? Please post your code so that Ed can get a better idea of what you're... |
Forum: C May 12th, 2008 |
| Replies: 4 Views: 870 The same number or some numbers are being repeated? Your code works just fine when Edward tests it, but repeated numbers are expected unless you go out of your way to avoid them with something like a... |