Jump to content
  • Advertisement
Sign in to follow this  
zlatko_bre_1985

RRRRRR!!! Arays

This topic is 4839 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

While working with Vertex buffers i found this code from DirectX SDK (i modified for my needs) D3DVERTEXELEMENT9 vertex0PosTex1Tex[] = { {0, 0,D3DDECLTYPE_FLOAT3,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_POSITIONT, 0}, {0,12,D3DDECLTYPE_FLOAT2,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_TEXCOORD, 0}, {1, 0,D3DDECLTYPE_FLOAT2,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_TEXCOORD, 1}, D3DDECL_END() }; This cannot compile and this is the errors compiler gives me: error C2059: syntax error : '{' error C2334: unexpected token(s) preceding '{'; skipping apparent function body I have problems before too with seting up array when declaring it but i forgot how i solved it. Also code completly copied from SDK generates more errors (end of bracket not found ,etc,etcetc) How to set this array :< HELP ME PLEASE!!!

Share this post


Link to post
Share on other sites
Advertisement
I don't think that the posted array is the problem. I copied the same exact array and compiled it in a junk project and it worked fine. Maby I'm just misunderstood you question?

EDIT: I compiled it in Microsofts visual C++ 2003

Share this post


Link to post
Share on other sites
Now thata you sad that i am missing H files i checked a code and throughly and find out that i didnt have a ending parenthesis ,and that as causing the trouble.

Thx everyone

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!