0

I'm trying to initialize main like this

int main(int argc, char argv[])

so I can pass "argv" and the crypt() result to strcmp() like this

    if (strcmp(argv, crypt(password, salt)) == 0)
    {
        return 0;
    }

I'm getting this error though

error: second parameter of 'main' (argument array) must be of type 'char **'

I can't pass "char **" to strcmp() though.

1 Answer 1

0

Silly me, I need to pass strcmp() argv[1]

now i can use char *argv[] to initialize main

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .