ok, since I am waiting for .NET to finish to install, I'll give you an example of how to use the library to do the dirty work:
Code:
#define LEN = 256
#define CHARSET = " \r\n\t"
int main(int argc, char *argv[], char *envp[])
{
int len;
int readInt;
// read up to 256 char
while ( fgets(line, LEN-1, stdin) != NULL ) {
// make sure the line ends with 0
line[LEN-1] = 0;
for ( char * p = strtok(NULL, CHARSET); p != NULL; p = strtok(p,CHARSET) ) {
// et hop!! here is an integer read from the flow
readInt = atoi(p);
// do whatever you want with that
}
}
// done
return 0;
}
it's up to you to test it