Help understanding #include <MFRC522.h> library code

HI,

I was hoping if I could get help with some explanations of what is going on in the RFID #include <MFRC522.h> library.

I was hoping you could tell me what this code is doing?
what is the purpose of it?
why does it have two :: in the middle of the code?

MFRC522::MIFARE_Key key;

Thanks,

Confused and frustrated

The :: is scope resolution operator. This is telling the compiler that the variable being defined here belongs to the MFRC522 class. It is of type MIFARE_Key. And it shall be named key.

This declares a variable 'key' of type 'MFRC522::MIFARE_Key'. MFRC522 is a scope name - it might be a class or a declared namespace.

In this case, MIFARE_Key is a typedef in the MFRC522 class. See

MFRC522.h@github