In C++, the only difference is the default access modifier.
struct:
class:
1struct Point {2 int x; // public by default3 int y;4};56class Point2 {7 int x; // private by default8 int y;9public:10 void setX(int x) { this->x = x; }11};
Convention: