how to create object struct C++ code example
Example 1: what is a struct in c++
struct Person
{
char name[50];
int age;
float salary;
};
Example 2: c++ structure
struct product {
int weight;
double price;
} ;
product apple;
product banana, melon;