How do I transfer an array of structures from glfw c++ to glsl?

Hello, can you help me transfer an array of structures to a shader?
I have a TochechSvet array
с++:

struct TochechSvet {
    TochechSvet(glm::vec3 zerkal = glm::vec3(), glm::vec3 smeshenie = glm::vec3(), glm::vec3 minSvet = glm::vec3(), glm::vec3 mesto = glm::vec3(), float konstanta = 0.f, float linei = 0.f, float kvadrat = 0.f)
        : zerkal(zerkal), smeshenie(smeshenie), minSvet(minSvet), mesto(mesto), konstanta(konstanta), linei(linei), kvadrat(kvadrat)
    {
    }
    glm::vec3 zerkal;
    glm::vec3 smeshenie;
    glm::vec3 minSvet;

    glm::vec3 mesto;

    float konstanta;
    float linei;
    float kvadrat;

};

and the function of transferring it to the shader through the buffer
с++:

glGenBuffers(1, &idGLarr);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, idGLarr);
glBufferData(GL_SHADER_STORAGE_BUFFER, numSvet * sizeof(TochechSvet), svetArr, GL_STATIC_DRAW);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, idGLarr);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);

the shader itself to pass the array to
glsl:

struct TochechSvet {
    vec3 otraj;
    vec3 smesh;
    vec3 minSvet;

    vec3 mesto;

    float konstanta;
    float linei;
    float kvadrat;

};

layout(std430, binding = 2) buffer Pomeh
{
    TochechSvet tochechSveti[];
};

how would it be correct to pass an array of TochechSvet structures?

You need to add explicit padding elements between the vec3s (but not between mesto and konstanta). And also add two extra floats to round up the size to a multiple of 16 bytes, so that the next structure in the array starts on a 16-byte boundary:

struct TochechSvet {
    vec3 otraj;
    float pad1;

    vec3 smesh;
    float pad2;

    vec3 minSvet;
    float pad3;

    vec3 mesto;
    float konstanta;

    float linei;
    float kvadrat;
    float pad4;
    float pad5;
};

Or you could interleave the vec3 fields and float fields and add a single float of padding. Note that you need to modify the GLSL structure to match.

struct TochechSvet {
    vec3 otraj;
    float konstanta;

    vec3 smesh;
    float linei;

    vec3 minSvet;
    float kvadrat;

    vec3 mesto;
    float padding;
};

Either way, a vec3 must start on a 16-byte boundary. GLSL will add padding to ensure that this is the case, but C++ won’t. Technically, you need to ensure that the array itself starts on a 16-byte boundary, but all of the common platforms automatically align dynamic memory (allocated with malloc or new) to at least a 16-byte boundary.

Thank you for solving my problem and explaining everything!