Typedeffing struct names is not necessary in C++ (unlike C where you'd have to use the struct keyword everywhere you declare instances, unless the struct is typedeffed).
Line 7 creates an array for two pointers to this struct, but as long these are not set to point to anything, you cannot use them.
You probably meant to declare an array of two structs (not pointers to struct):
Code:
7. banyan count[2]; // This is the statement I am interested in
8. count[0].height = 100;
9. count[0].width = 10;
In C++ you could simply declare the struct as
Code:
1. struct banyan{
2. int height;
3. int width;
4. int weight;
5. };
and line 7 would work just the same.