Jump to content
  • Advertisement
Sign in to follow this  

error C4430: missing type specifier

This topic is 3019 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 working on compiling this HUGE project that came with the 3D Game Programming Book by Stefan Zerbst. I am honestly in over my head because I dont understand 1/10th of it, but I just want to get it compiled to see how it looks, and the only error I'm getting is this: 1>c:\documents and settings\<name>\desktop\zfx3d\chap_15\include\cgameentity.h(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Yeah, so it's just a header file. I'm going to paste the whole thing. I've marked row 29. // FILE: CGameEntity.h #ifndef CGameEntity_H #define CGameEntity_H #include <windows.h> #include <stdio.h> #include "zfx.h" #include "CGamePortal.h" #include "CGameLevel.h" class CGameLevel; class CGamePortal; class CGameEntity { public: CGameEntity(void); virtual ~CGameEntity(void); virtual HRESULT Render(ZFXRenderDevice*)=0; virtual void Update(float)=0; virtual bool TouchAndUse(const ZFXVector&)=0; virtual bool TestCollision(const ZFXAabb&, ZFXPlane*)=0; virtual bool TestCollision(const ZFXRay&, float, float*)=0; virtual bool Load(FILE*); virtual ZFXAabb GetAabb(void) { return m_Aabb; } 29----> virtual IsOfType(ZFXENTITY e) { return (e==m_Type); } protected: ZFXENTITY m_Type; ZFXAabb m_Aabb; VERTEX *m_pVerts; WORD *m_pIndis; UINT m_NumVerts; UINT m_NumIndis; UINT m_nSkin; }; // class typedef class CGameEntity *LPGAMEENTITY; /*----------------------------------------------------------------*/ class CGameDoor : public CGameEntity { public: CGameDoor(void); virtual ~CGameDoor(void); virtual HRESULT Render(ZFXRenderDevice*); virtual void Update(float); virtual bool Load(FILE*); virtual bool TouchAndUse(const ZFXVector&); virtual bool TestCollision(const ZFXAabb&, ZFXPlane*); virtual bool TestCollision(const ZFXRay&, float, float*); virtual bool IsActive(void) { return m_bActive; } virtual bool ConnectToPortals(CGameLevel*); private: ZFXVector m_vcT; ZFXAXIS m_Axis; float m_fSign; float m_fTime; float m_fDist; float m_fPause; bool m_bActive; bool m_bOpening; bool m_bPausing; UINT m_Portal[2]; CGamePortal* m_pPortal_A; CGamePortal* m_pPortal_B; bool LoadMesh(FILE *pFile); }; // class typedef class CGameDoor *LPGAMEDOOR; /*----------------------------------------------------------------*/ #endif Thanks in advance.

Share this post

Link to post
Share on other sites
fixed it, thank you very much! Was fully expecting it to be something complicated. =)

EDIT: I found a new error, this is really baffling me because I can't see what's wrong.

// loop through all objects in list
for (UINT i=0; i<(*pC); i++)
if (ppLob == pLob) break;

// did we find the one we came for?
if (i>=(*pC)) return; <--- Error appears here.


and I keep on getting "error C2065: 'i' : undeclared identifier"

I tried putting an int i but it doesn't help. Tried about 5 different combinations but it just doesn't want to compile without errors.

[Edited by - Lemmi on March 14, 2010 11:06:13 AM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!