Sign in to follow this  
ratha

Error Accessing a Structure

Recommended Posts

Hi!
I've declared a struct named CameraType globally in a file called GameManager.h. I'm trying to access it like this: CameraType cType; in a file called GamePlayState.cpp. I got the following error:

IntelliSense: identifier "CameraType" is undefined d:\goldminer\source\game\gameplaystate.cpp 109

I've also included the GameManager.h file to the GamePlayState.cpp file. How to overcome this error?



[Edited by - ratha on October 14, 2010 7:49:50 AM]

Share this post


Link to post
Share on other sites

struct CameraType
{
core::vector3df FRONTCAM;
core::vector3df BEHINDCAM;
core::vector3df TOPCAM;
};



I'm creating a variable of this structure in another file called GamePlayState.cpp like this:

CameraType cType;

inside a function.

Share this post


Link to post
Share on other sites

IntelliSense: identifier "CameraType" is undefined d:\goldminer\source\game\gameplaystate.cpp 109


Erm, does the build actually fail? Because this message looks more like IntelliSense is confused than like a compiler error. (Or did you just copy the error message from some mouse-over window?)

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