Q:

error: invalid type argument of unary '*' (have 'int')

error: invalid type argument of unary '*' (have 'int')

struct test_t {
    int var1[5];
    int var2[10];
    int var3[15];
}

test_t* test;
test->var1[0] = 5;

How can I solve this problem?

A:

You should write:
struct test_t* test;

Or use typedef if you want to avoid writing struct every time you declare a variable of that type:
typedef struct test_t {
    int var1[5];
    int var2[10];
    int var3[15];
} test_t;

test_t* test;

Side note: In C++ the struct name is placed in the regular namespace, therefore there is no need to write struct before declaring a variable of that type.

