How is Struct different from Class? 

by interviewspreparation.com

Struct 

A structure in C++ is a user-defined data type that allows you to group together variables of different data types under a single name. It's used to represent a record or collection of related data items. 

by interviewspreparation.com

by interviewspreparation.com

It supports concepts like inheritance, polymorphism, and encapsulation 

A class in C++ is a user-defined data type that serves as a blueprint for creating objects 

Class

by interviewspreparation.com

// Struct  struct Point  {   int x;    int y;  }; 

Example

// Class  class Point          public:              int x;     int y;  };