Mail Archives: cygwin/1996/12/08/01:36:19
Dear sirs,
I just installed B17. I have a problem with one of the string handling
functions. Please see the source:
-------------------
#include <string.h>
#include <stdio.h>
main()
{
char *x, *y;
x = strtok("123 456 789 abc", " ");
y = strtok(x, " ");
printf("%s %s\n", x, y);
}
-------------------
and the compilation output:
-------------------
t.cc: In function `int main()':
t.cc:7: warning: implicit declaration of function `int strtok(...)'
t.cc:7: warning: assignment to `char *' from `int' lacks a cast
t.cc:8: warning: assignment to `char *' from `int' lacks a cast
-------------------
Even if the function strtok is in the file string.h, the conditionals
inside the header seem to comment the declaration of the function. What
do I have to do? The executable produces a runtime error.
Thank you for your help.
Yours, Horia Pop
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -