I have one library file missing, it should contain the following functions:
Can anyone tell me what library file is it? Maybe I even have it...Code:crypt gettimeofday srandom random
I have one library file missing, it should contain the following functions:
Can anyone tell me what library file is it? Maybe I even have it...Code:crypt gettimeofday srandom random
Code:#include <stdlib.h>
stdlib.h is not standard.
useinstead.Code:#include <cstdlib>
[edit] for rand and srand, anyway. I don't know about the other two. [/edit]
Last edited by Decrypt; 01-23-2006 at 08:32 PM.
There is a difference between tedious and difficult.
yes cstdlib.h is the standard one...
....for C++
Last edited by what3v3r; 01-23-2006 at 10:59 PM.
this is the difference between c and c++. we're working with c++ so we would want to use
maybe they're both standard though...Code:#include <cstdlib>
you might want
and for the crypt function, i couldn't help youCode:#include <ctime>
anyway did that answer your question maxorator?
Last edited by linucksrox; 01-23-2006 at 10:52 PM.
"What are all you parallelograms doing here?" - Peter Griffin (to Joe and his wheelchair buddies)
man cryptOriginally Posted by maxorator
man gettimeofday
man srandom
man random
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
>> stdlib.h is not standard.
Yes it is. It is standard in C++, but deprecated, meaning it will still work on all standards-compliant compilers now, but maybe not in a later version of the standard. You are right that <cstdlib> is preferred in C++.
>> yes cstdlib.h is the standard one...
There's no such thing as cstdlib.h, it is cstdlib or stdlib.h.
Of course, none of the names in the OP are from stdlib.h (or cstdlib) anyway, so it doesn't matter in this case.
> I have one library file missing, it should contain the following functions:
Your question is meaningless without you also telling us which OS/Compiler you have.
See the FAQ on what to do if you need "foo.h" but don't have it question.