Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualnoatom

Posted 12 December 2012 - 11:29 AM

solved,I just forgotten to add the directx stuff to include...stupid yes..

#1noatom

Posted 12 December 2012 - 11:28 AM

I posted here because it's xna releated.

So I decided I should put my camera in different files,a header and a cpp file.

So I have this:

FPcam.h

[source lang="cpp"]#ifndef FPSCAM_H#define FPSCAM_H#include <xnamath.h>class FPScam{public: XMVECTOR camPosition = XMVectorSet(1.0f,3.0f,5.0f,0.0f); XMVECTOR camTarget = XMVectorSet(1.0f,1.0f,1.0f,0.0f); XMVECTOR camUp = XMVectorSet(0.0f,1.0f,0.0f,0.0f); XMVECTOR DefaultForward = XMVectorSet(0.0f,0.0f,1.0f, 0.0f); XMVECTOR DefaultRight = XMVectorSet(1.0f,0.0f,0.0f, 0.0f); XMVECTOR camForward = XMVectorSet(0.0f,0.0f,1.0f, 0.0f); XMVECTOR camRight = XMVectorSet(1.0f,0.0f,0.0f, 0.0f); XMMATRIX camRotationMatrix; float moveLeftRight = 0.0f; float moveBackForward = 0.0f; float camYaw = 0.0f; float camPitch = 0.0f; XMMATRIX camView; void UpdateCamera();};#endif[/source]


And then I created the cpp file:
FPcam.cpp

[source lang="cpp"]void FPScam::UpdateCamera(){ }[/source]

Believe it or not,the above code creates the following errors:
[source lang="cpp"]1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159): error C2146: syntax error : missing ';' before identifier 'XMConvertToRadians'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159): error C2433: 'FLOAT' : '__forceinline' not permitted on data declarations1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159): error C2146: syntax error : missing ')' before identifier 'fDegrees'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159): error C2059: syntax error : ')'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159): error C2143: syntax error : missing ';' before '{'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159): error C2447: '{' : missing function header (old-style formal list?)1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C2146: syntax error : missing ';' before identifier 'XMConvertToDegrees'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C2433: 'FLOAT' : '__forceinline' not permitted on data declarations1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C2086: 'int FLOAT' : redefinition1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(159) : see declaration of 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C2146: syntax error : missing ')' before identifier 'fRadians'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C2059: syntax error : ')'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C2143: syntax error : missing ';' before '{'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(160): error C2447: '{' : missing function header (old-style formal list?)1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(217): error C2146: syntax error : missing ';' before identifier '__vector4i'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(217): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(217): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(246): error C2146: syntax error : missing ';' before identifier 'i'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(246): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(246): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(260): error C2146: syntax error : missing ';' before identifier 'u'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(260): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(260): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(316): error C2061: syntax error : identifier 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(316): error C2805: binary 'operator *=' has too few parameters1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(317): error C2061: syntax error : identifier 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(317): error C2805: binary 'operator /=' has too few parameters1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(323): error C2061: syntax error : identifier 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(324): error C2146: syntax error : missing ')' before identifier 'S'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(324): error C2365: 'operator *' : redefinition; previous definition was 'function'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(324): error C2440: 'initializing' : cannot convert from 'int' to 'XMVECTOR'1> No constructor could take the source type, or constructor overload resolution was ambiguous1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(324): error C2059: syntax error : ')'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(325): error C2061: syntax error : identifier 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(325): error C2805: binary 'operator /' has too few parameters1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(342): error C2146: syntax error : missing ';' before identifier '_11'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(342): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(342): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(342): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(342): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(342): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(343): error C2146: syntax error : missing ';' before identifier '_21'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(343): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(343): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(343): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(343): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(343): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(344): error C2146: syntax error : missing ';' before identifier '_31'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(344): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(344): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(344): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(344): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(344): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(345): error C2146: syntax error : missing ';' before identifier '_41'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(345): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(345): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(345): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(345): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(345): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(347): error C2146: syntax error : missing ';' before identifier 'm'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(347): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(347): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(354): error C2061: syntax error : identifier 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(354): error C2535: '_XMMATRIX::_XMMATRIX(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(352) : see declaration of '_XMMATRIX::_XMMATRIX'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(358): error C2061: syntax error : identifier 'CONST'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(358): error C2535: '_XMMATRIX::_XMMATRIX(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(352) : see declaration of '_XMMATRIX::_XMMATRIX'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(360): error C2143: syntax error : missing ';' before '('1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(360): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(360): error C3646: 'CONST' : unknown override specifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(360): error C2719: 'Row': formal parameter with __declspec(align('16')) won't be aligned1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(360): error C2719: 'Column': formal parameter with __declspec(align('16')) won't be aligned1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(360): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C2143: syntax error : missing ';' before '&'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C2719: 'Row': formal parameter with __declspec(align('16')) won't be aligned1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C2719: 'Column': formal parameter with __declspec(align('16')) won't be aligned1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C2556: 'int &_XMMATRIX::operator ()(UINT,UINT)' : overloaded function differs only by return type from 'int _XMMATRIX::operator ()(UINT,UINT)'1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(360) : see declaration of '_XMMATRIX::operator ()'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C2040: '_XMMATRIX::operator ()' : 'int &(UINT,UINT)' differs in levels of indirection from 'int (UINT,UINT)'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C2059: syntax error : 'return'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(361): error C2238: unexpected token(s) preceding ';'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(363): error C2143: syntax error : missing ';' before '&'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(363): error C2065: 'CONST' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(363): error C2146: syntax error : missing ')' before identifier '_XMMATRIX'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(363): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(363): error C2059: syntax error : ')'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(366): error C2065: 'CONST' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(366): error C2146: syntax error : missing ')' before identifier '_XMMATRIX'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(366): error C2365: 'operator *=' : redefinition; previous definition was 'function'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(366): error C2059: syntax error : ')'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(367): error C2065: 'CONST' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(367): error C2146: syntax error : missing ')' before identifier '_XMMATRIX'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(367): error C2365: 'operator *' : redefinition; previous definition was 'function'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(367): error C2059: syntax error : ')'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(372): error C2059: syntax error : '}'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(372): error C2143: syntax error : missing ';' before '}'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(372): error C2059: syntax error : '}'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(378): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(378): error C2143: syntax error : missing ';' before '&'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(378): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(378): error C2530: 'CXMMATRIX' : references must be initialized1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(386): error C2146: syntax error : missing ';' before identifier 'HALF'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(386): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(386): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(391): error C2146: syntax error : missing ';' before identifier 'x'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(391): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(391): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(392): error C2146: syntax error : missing ';' before identifier 'y'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(392): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(392): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(397): error C2061: syntax error : identifier 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(397): error C2535: '_XMFLOAT2::_XMFLOAT2(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(396) : see declaration of '_XMFLOAT2::_XMFLOAT2'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(398): error C2061: syntax error : identifier 'CONST'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(398): error C2535: '_XMFLOAT2::_XMFLOAT2(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(396) : see declaration of '_XMFLOAT2::_XMFLOAT2'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(400): error C2061: syntax error : identifier 'CONST'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(400): error C2805: binary 'operator =' has too few parameters1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(397): error C2065: '_x' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(397): error C2065: '_y' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(397): error C2614: '_XMFLOAT2' : illegal member initialization: 'y' is not a base or member1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(397): error C2614: '_XMFLOAT2' : illegal member initialization: 'x' is not a base or member1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(411): error C2061: syntax error : identifier 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(411): error C2535: 'XMFLOAT2A::XMFLOAT2A(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(410) : see declaration of 'XMFLOAT2A::XMFLOAT2A'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(412): error C2061: syntax error : identifier 'CONST'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(412): error C2535: 'XMFLOAT2A::XMFLOAT2A(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(410) : see declaration of 'XMFLOAT2A::XMFLOAT2A'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(414): error C2061: syntax error : identifier 'CONST'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(414): error C2805: binary 'operator =' has too few parameters1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(411): error C2065: '_x' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(411): error C2065: '_y' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(412): error C2065: 'pArray' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(423): error C2146: syntax error : missing ';' before identifier 'x'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(423): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(423): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(424): error C2146: syntax error : missing ';' before identifier 'y'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(424): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(424): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(429): error C2061: syntax error : identifier 'HALF'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(429): error C2535: '_XMHALF2::_XMHALF2(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(428) : see declaration of '_XMHALF2::_XMHALF2'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(430): error C2061: syntax error : identifier 'CONST'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(430): error C2535: '_XMHALF2::_XMHALF2(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(428) : see declaration of '_XMHALF2::_XMHALF2'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(431): error C2061: syntax error : identifier 'FLOAT'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(431): error C2535: '_XMHALF2::_XMHALF2(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(428) : see declaration of '_XMHALF2::_XMHALF2'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(432): error C2061: syntax error : identifier 'CONST'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(432): error C2535: '_XMHALF2::_XMHALF2(void)' : member function already defined or declared1> C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(428) : see declaration of '_XMHALF2::_XMHALF2'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(434): error C2061: syntax error : identifier 'CONST'1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(434): error C2805: binary 'operator =' has too few parameters1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(429): error C2065: '_x' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(429): error C2065: '_y' : undeclared identifier1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(429): error C2614: '_XMHALF2' : illegal member initialization: 'y' is not a base or member1>C:\Program Files\Microsoft DirectX SDK (June 2010)\Include\xnamath.h(429): fatal error C1003: error count exceeds 100; stopping compilation1>1>Build FAILED.[/source]


I can't understand,I'm using xna in the same project with other files,and there is no problem,how come those errors appear? What am I doing wrong?

PARTNERS