I\'m trying to create an array of structs. Is the code below valid? I keep getting an expected primary-expression before \'{\' token error.
expected primary-expression before \'{\'
int main
Some compilers support compound literals as an extention, allowing this construct:
Customer customerRecords[2]; customerRecords[0] = (Customer){25, "Bob Jones"}; customerRecords[1] = (Customer){26, "Jim Smith"};
But it's rather unportable.