Collision between a player and a solid block C++ SDL2

Create a new rect and initialize it with the dimensions of of your player(you named it Sprite) and make the new rect move with your player and check if the collision box of the player Colides with the solid object(Sprite1) and.
Check out lazyfoo┬┤s tutorial: https://lazyfoo.net/tutorials/SDL/27_collision_detection/index.php

    SDL_Rect r2 = Sprite1->GetRect();
    if (CKeyboard::Get()->GetKey(SDL_SCANCODE_LEFT))
    {
        Vel.x -= 1.0f;
    }
    else if (CKeyboard::Get()->GetKey(SDL_SCANCODE_RIGHT))
    {
        Vel.x += 1.0f;
    }

    Position.x += Vel.x;
    Collisionbox.x = Position.x;

    if (Collision::Get()->Checkcollision(Collisionbox, r2))
    {
        Position.x -= Vel.x;
        Collisionbox.x = Position.x;
    }

    if (CKeyboard::Get()->GetKey(SDL_SCANCODE_UP))
    {
        Vel.y -= 1.0f;
    }
    else if (CKeyboard::Get()->GetKey(SDL_SCANCODE_DOWN))
    {
        Vel.y += 1.0f;
        Vel.y += 1.0f;
    }

    Position.y += Vel.y;
    Collisionbox.y = Position.y;

    if (Collision::Get()->Checkcollision(Collisionbox, r2))
    {
        Position.y -= Vel.y;
        Collisionbox.y = Position.y;
    }

I didn’t test the code but it should work. If you’ll still have trouble check out lazyfoo’s tutorial about collision as I said :P.

I hope this helps