Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

airseb

little problem of beginner with D3DXVECTOR3

This topic is 5450 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

Hi ! I''m beginner with directx and i don''t manage to use the type D3DXVECTOR3 in my program. can you help me ? the errors are : error C2065: ''CoorDatasCameraX'' : undeclared identifier error C2065: ''CoorDatasCameraY'' : undeclared identifier error C2065: ''CoorDatasCameraZ'' : undeclared identifier this is the code :
#include <stdio.h>
#include <iostream.h>
#include <string.h>
#include <conio.h>
#include <stdlib.h>
#include <d3dx9math.h>
#include <d3d9types.h>
.
.
.
class readAnAse
	{
	public :
/************skip************************/
		D3DXVECTOR3 (float CoorDatasCameraX, float CoorDatasCameraY, float CoorDatasCameraZ) ;
.
.
.
 
.
.
.
fscanf (pointeur, "%f%f%f", &(CoorDatasCameraX), &(CoorDatasCameraY),
		&(CoorDatasCameraZ)) ;
.
.
.
 

Share this post


Link to post
Share on other sites
Advertisement
It is not clear what you are trying to do. The error has to do with the compiler not knowing what CoorDatasCamera* is. This is not a DirectX error at all.

Is your fscanf line inside a function where CoorDatasCamera* variables are defined? It doesn''t seem to be.

And what are you trying to do with this:
D3DXVECTOR3 (float CoorDatasCameraX, float CoorDatasCameraY, float CoorDatasCameraZ) ;

Is is a function or a class variable? If it is a class variable it should be something like this:

D3DXVECTOR3 m_CoorDatasCamera;

Then in a constructor or some initialization function you can initialize it like this:

m_CoorDatasCamera.x = m_CoorDatasCamera.y = m_CoorDatasCamera.z = 1.0f;

Hope this helps...
/jk

Share this post


Link to post
Share on other sites

  • 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!