0

When I attempt to "make" this code, I'm getting error: expected expression on lines crack.c:33:31: and crack.c:37:31:

Tried to debug this for ages but I'm just out of my depth, am I missing something obvious?

        for(int i = 0; i < 5; i++)
    {
        test = (crypt(key, salt));
        if (test == argv[1])
        {
            return 0;
            printf("GJ\n");
        }
        else if (key[i] => 65 && key[i] <= 89) // We don't want to increase 90 'Z' to 91
        {
            key[i] = key[i] + 1;
        }
        else if (key[i] => 97 && key[i] <= 121) // We don't want to increase 122 'z' to 123
        {
            key[i] = key[i] +1;
        }
    }
1

You did the operator wrong. >=, not =>. With =>, C sees = and expects an assignment (which requires an expression on the right side), but finds > instead.

You must log in to answer this question.

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