Sign in to follow this  
totaljj

Multiple array initial values set up method?

Recommended Posts

I would like to define pts[0] only before processing pts. But I get parse error for below code. GLfloat pts[20][12][3]; pts[0]={{-20.0, 0.0, -5}, {-20.0, 0.0,0}, {-2.0, 0.0, -5}, {-2.0, 0.0, 0}, {-1, -3.0, -5}, {-1, -3.0, 0}, {1, -3.0, -5}, {1.0, -3.0, 0}, {2,0,-5}, {2,0,0}, {20,0,-5}, {20,0,0}};

Share this post


Link to post
Share on other sites
array/struct initializers can only be used at the first place of definition, you cannot use array/struct initializers in an assignment operation, assignment != initialization.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this