Fingerprint error

following error shows upon compilation.
kindly help.

#include <Adafruit_Fingerprint.h>
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);

finger.begin(57600);

  if (finger.verifyPassword()) {
    lcd.setCursor(0, 0);
    lcd.print("  FingerPrint ");
    lcd.setCursor(0, 1);
    lcd.print("Sensor Connected");
  }
  else  {
    lcd.setCursor(0, 0);
    lcd.print("Unable to found");
    lcd.setCursor(0, 1);
    lcd.print("Sensor");
    delay(3000);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Check Connections");

    while (1) {
      delay(1);
    }
  }

  uint8_t p = finger.getImage();
  if (p != FINGERPRINT_OK)  {
    lcd.setCursor(0, 0);
    lcd.print("  Waiting For");
    lcd.setCursor(0, 1);
    lcd.print("  Valid Finger");
    return -1;
  }

  p = finger.image2Tz();
  if (p != FINGERPRINT_OK)  {
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("  Messy Image");
    lcd.setCursor(0, 1);
    lcd.print("  Try Again");
    delay(3000);
    lcd.clear();
    return -1;
  }
p = finger.fingerFastSearch();
  if (p != FINGERPRINT_OK)  {
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Not Valid Finger");
    delay(3000);
    lcd.clear();
    return -1;
  }

Hello
Take some time and run a tutorial to the hardware selected.

Have a nice day and enjoy coding in C++.
Дайте миру шанс!

tried already

Code not in any function, and you don't have anything called "finger"
Take a look at the example code that came with the library.

Moved to a more suitable area.

It's not an installation or troubleshooting issue

Moved to Programming Questions.

@farhan74, screenshots of error messages are useless. Use the button on the right in the orange bar to copy the errors and next paste here using code rags

Did you at least try the Blink example to verify you can compile and upload?
Do you understand how to code in C++?
Do you understand what an Arduino sketch requires?

For Arduino you must have setup() and loop() functions. You have neither and none of your code is in a function.

Start with one of the Adafruit_Fingerprint library examples and get it working, before making any modifications.

The library example starts with this:

#include <Adafruit_Fingerprint.h>

#if (defined(__AVR__) || defined(ESP8266)) && !defined(__AVR_ATmega2560__)
// For UNO and others without hardware serial, we must use software serial...
// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino  (WHITE wire)
// Set up the serial port to use softwareserial..
SoftwareSerial mySerial(2, 3);
#else
// On Leonardo/M0/etc, others with hardware serial, use hardware serial!
// #0 is green wire, #1 is white
#define mySerial Serial1
#endif

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()
{
  Serial.begin(9600);
  while (!Serial);  // For Yun/Leo/Micro/Zero/...
  delay(100);
  Serial.println("\n\nAdafruit finger detect test");

  // set the data rate for the sensor serial port
  finger.begin(57600);

You are missing this part:

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()
{