Page 1 of 1

Compiler Error Caused by functions ?

Posted: Thu Apr 17, 2003 5:43 pm
by route
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.

Posted: Fri Apr 18, 2003 7:45 am
by Dominik Michniewski
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

Posted: Fri Apr 18, 2003 11:19 am
by route
compile error

Here are the compiler error messages:

01524002_24.c: In function `int check(long unsigned int)':
01524002_24.c:9: implicit declaration of function `int ultoa(...)'