Compiler Error Caused by functions ?

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
route
New poster
Posts: 39
Joined: Sat Dec 21, 2002 1:25 am

Compiler Error Caused by functions ?

Post 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.
Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post 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
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)
route
New poster
Posts: 39
Joined: Sat Dec 21, 2002 1:25 am

Post 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(...)'
Post Reply

Return to “C++”