A class is a program-defined compound datatype similar to structs which can contain both data members and behaviors (which are member functions). A class is somewhat similar to structs as shown below,

class Point
{
public:
    int x{};
    int y{};
};
 
int main()
{
    Point p{1, 2};
    return 0;
}

public is an access-specifier which tells these members are public to outside world in the program.

References

  1. https://www.learncpp.com/cpp-tutorial/introduction-to-classes/