Undefined reference to 'getpass' in c

115 views Asked by At
#include <stdio.h>
#include <unistd.h>
int main()
{
  char *itm;
  char *qnt;
  qnt,itm = getpass("");
  printf("%s %s ",qnt,itm);
    return 0;
}

So if i run this code in online compiler like replit , it runs without error . But when i run it in codeblock , it throws an error stating undefined reference to 'getpass' . how to fix this ?

0

There are 0 answers