Possible Duplicate:
What are the differences between struct and class in C++
In C++ is there any reason to use a Struct inside of a Class outside of making your own linked list or b-tree?
I’ve taken a few programming courses in college, but haven’t really thought about this until now. It seems like there wouldn’t be any benefit from using a struct inside of a class, but I don’t have enough experience to know what situations really require certain things. I’m hoping that you experienced programmers can shed some light on this for me.
Here is a complex scenario: records of sub-records.
.
};
Every ingredient entry has a title and a category. The title and categories are separate records so that ingredients can share common titles and categories.
Usage:
Title_Record title_table[30]; // Database table of 30 titles.
Category_Record category_table[30]; // Database table of 30 categories.
Remember that the keywords
structandclassonly differ in their default accessibility.