can a struct contain a struct c++ code example
Example 1: how to put a struct in another struct C
struct B { // <-- declare before
int number;
};
struct A {
int data;
B b; // <--- declare data member of `B`
};
Example 2: struct c++
struct product {
int weight;
double price;
} apple, banana, melon;