Check out example codes for "what is a struct in c++". It will help you in understanding the concepts better.

Code Example 1

struct Person
{
    char name[50];
    int age;
    float salary;
};

Code Example 2

struct product {
  int weight;
  double price;
} ;

product apple;
product banana, melon;

Learn ReactJs, React Native from akashmittal.com