My code is as following:
struct Point {
float x, y, z ;
};
int main ()
{
Point[3] pts = [
{1.0, 0.0, 0.0} ,
{0.0, 1.0, 0.0} ,
{0.0, 0.0, 1.0}
];
return 0 ;
}
But, the compiler report "Error: array initializers as expressions are not allowed".
Then, how do I initialize an array of struct ?