I am trying to initialize an array that has had its memory allocated with 'new'.
I am having trouble working out why it wont compile.
Float3* vertex_data = new Float3[3];
vertex_data[] =
{
-0.5f, 2.0f, 0.0f,
0.5f, 2.0f, 0.0f,
0.0f, 0.0f, 0.0f,
};
delete[] vertex_data;
Compilation fails at the vertex_data[] initialization stage.
Syntax error: "]"
'Float3' is just a struct with three floats in it.
Any advice would be awesome.
Thanks in advance