C : crypt function

Posted by kiruthika on Stack Overflow See other posts from Stack Overflow or by kiruthika
Published on 2010-04-02T06:56:54Z Indexed on 2010/04/02 7:03 UTC
Read the original article Hit count: 300

Filed under:

Hi all,

I have used the crypt function in c to encrypt the given string. I have written the following code,

#include<stdio.h>
#include<unistd.h>

int main()
{
printf("%s\n",crypt("passwd",1000));
}

But the above code threw an error ,"undefined reference to `crypt'". What is the problem in the above code.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about c