I have this array of structs in C:
struct Stream_Bufer {
int size_;
int capacity_max;
int p_read;
int p_write;
char data_[320000];
} stream_buffer_[30];
But if I make int capacity_max = 320000;
I will get the error: "data member initializer is not allowed". One way to initialize, that I found, is:
for(int i = 0; i<30;i++){
stream_buffer_[i].capacity_max = 320000;
}
Any "clean" way to do this?