RRRRRR!!! Arays

Started by
2 comments, last by zlatko_bre_1985 18 years, 8 months ago
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!!!
Serbia,Zrenjanin
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
sounds like you're missing header files for the declaration of the D3DVERTEXELEMENT9 type.
-out
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
Serbia,Zrenjanin

This topic is closed to new replies.

Advertisement