i am trying to get ahead in the C++ class and i came across with the "struct" instruction and i'm trying to fallow the book example but for some reason after i compiled, the code return with a lot of error. I need to say this book is not what i expected for a beginner but is what will uses in class. Can i get some help please with this code. to be more specific how to use a struct within a struct.
A struct just defines a datatype. Once the struct is defined, you use just as you would any other data type. You need to first declare it, then you can use it.
1 2 3 4 5 6
int main()
{
employeeType employee;
employee.name.firstName = "Bob";
//And so on...
}