Bus as input in C MEX S-Function and array of structure as structure members

2 views (last 30 days)
I want to build an sfunction with an input bus of type t_Struct2 which is defined like this :
typedef struct {
int a; int b; } t_Struct1;
typedef struct {
int c; t_Struct1 d[10]; } t_Struct2;
When I try to generate the code for the c-mex function and compile it the following error occurs :
error C2228: left of '.a' must have class/struct/union. Type is t_Struct1[10]
Is a structure containing a member of type array of structure allowed in this case ?
Both types t_Struct1 and t_Struct2 are defined in the same header.

Answers (0)

Categories

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!