I have written a program dealing with strings.
These are the header files I have included:
<stdio.h> <stdlib.h> <string.h>
However when I use "ultoa" or "strtoul", the judge said that it was an error.
Can anyone answer my question ?
Moreover, the judge accepts "%ld" or "%u" ?
Thanks.
Compiler Error Caused by functions ?
Moderator: Board moderators
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
Which message you are given ? Restricted function or other ?
And are you sure, that this functions are in ANSI standard ? Judge's compiler uses ANSI C/C++ standard to compile our code. I find only one function, which is out of ANSI, but is allowed by judge - strdup(). (maybe now it's in stndard, I don't know)....
Judge accepts both of them, but "%u" means unsigned int (32-bit) - same as "%lu", and "%ld" means signed 32-bit int ...
Best regards
DM
And are you sure, that this functions are in ANSI standard ? Judge's compiler uses ANSI C/C++ standard to compile our code. I find only one function, which is out of ANSI, but is allowed by judge - strdup(). (maybe now it's in stndard, I don't know)....
Judge accepts both of them, but "%u" means unsigned int (32-bit) - same as "%lu", and "%ld" means signed 32-bit int ...
Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
Born from ashes - restarting counter of problems (800+ solved problems)