Stucture with array of pointers in C
- by MVTCplusplus
What's wrong with this?  Can I have an array of pointers to SDL_Surfaces in a struct in C?
typedef struct {
    int next_wheel;
    int pos_X;
    int pos_Y;
    int front_wheel_pos_X;
    int front_wheel_pos_Y;
    int velocity;
    int rear_wheel_pos_X;
    int rear_wheel_pos_Y;
    SDL_Surface* body;
    SDL_Surface* rear_wheel[9];
    SDL_Surface* front_wheel[9];
} mars_rover;
...
mars_rover* init_rover() {
    mars_rover* rover = (mars_rover*)malloc(sizeof(mars_rover) + sizeof(SDL_Surface) * 19);
    ...
    return rover;
}
int main() {
    mars_rover* rover = init_rover();
...
}