Reputation: 906
I have this typedef:
typedef SomeClass* (grid8x8)[8][8];
I want to have this typedef visible in all of my source files. However, the file in which this typedef would be defined would not be aware of SomeClass class. The only solution would be to include the header of SomeClass in the file where typedef is defined. However, this could lead to many problems, like circular inclusions etc. Is there any smart way to do this?
Upvotes: 0
Views: 56
Reputation: 7982
Forward declare the class.
typedef class SomeClass* (grid8x8)[8][8];
Upvotes: 5