3 ms·
Return pointer to array of 4 integers: int32_t (* bar(void))[4] { static int32_t u[4] = {1, 0, 1, 0}; return &u; } Return a pointer to a funct
by danoman 4y ago
Return pointer to array of 4 integers:
int32_t (* bar(void))[4] {
static int32_t u[4] = {1, 0, 1, 0};
return &u;
}
Return a pointer to a function taking a char:
void f(char a) {
// ...
}
void (* baz(void))(char) {
return f;
}
- wnoise 4y agoThis is where you really want to start using typedefs.