Jump to content
  • Advertisement

Archived

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

jtmerchant

std:: not being recognized....

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

For some reason, whenever I try to use anything out of the std namespace, it acts like it doesn''t exist. Example: std::vector myInts; returns the errors: .../fwmesh.h(44) : error C2653: ''std'' : is not a class or namespace name .../fwmesh.h(44) : error C2143: syntax error : missing '';'' before ''<'' .../fwmesh.h(44) : error C2501: ''list'' : missing storage-class or type specifiers .../fwmesh.h(44) : error C2059: syntax error : ''<'' .../fwmesh.h(44) : error C2238: unexpected token(s) preceding '';'' I know that I''ve had this problem before, and I think I fixed it, but the problem is I don''t remember how, as it was like a month ago and I have a really bad memory... "P-pl-es... h-hel-p" -- Fifth Element Thanks! Merchant the merchant

Share this post


Link to post
Share on other sites
Advertisement
I am gonna magicly guess what ure sourcce looks like.

SHOW THE SOURCE FOR _____ BEFORE YOU ASK!
^
fwmesh.h




[edited by - DerAngeD on February 8, 2004 2:40:05 PM]

Share this post


Link to post
Share on other sites
What I assume (since you do not post code) is that although you are using std:: perhaps you might not have added #include <vector> header at the top?

Share this post


Link to post
Share on other sites
Oh sorry...


#ifndef FWMESH_H
#define FWMESH_H


#include "FWextIncludes.h"
#include "FWdefineTypes.h"
#include "FWobject.h"
#include <vector>
//using namespace standard;


struct __declspec(dllexport) FWVERTEX {
FWVERTEX(float X,float Y,float Z,D3DCOLOR C) {
x=X;
y=Y;
z=Z;
color=C;
}
float x,y,z;
D3DCOLOR color;
static const DWORD FVF;
};
class __declspec(dllexport) FWMesh{//:public FWObject {

public:
FWMesh(){}
~FWMesh(){}
//virtual FWRESULT Release();

FWRESULT InitBuffer(IDirect3DDevice9* device,FWBUFFERTYPE bt);
FWRESULT ReleaseBuffer(FWBUFFERTYPE bt);
FWRESULT FillBuffer(FWBUFFERTYPE);
FWRESULT FillList(void* entry,FWBUFFERTYPE bt);
FWRESULT EmptyList(FWBUFFERTYPE bt);
FWRESULT Render(IDirect3DDevice9* device);
protected:
// std::vector<FWVERTEX> vl;

//std::vector<int> ill;

std::vector<int> mylist;
//IDirect3DVertexBuffer9* vb;

//IDirect3DIndexBuffer9* ib;

};


#endif // FWMESH_H


I commented out various items to make sure they weren't the problem.

[edited by - jtmerchant on February 8, 2004 2:52:31 PM]

Share this post


Link to post
Share on other sites
That code seems fine. Oh, by the way, "using namespace standard;" doesn''t work because it doesn''t exist.

Share this post


Link to post
Share on other sites
I assume you included fwmesh.h in either FWextIncludes.h, FWdefineTypes.h or FWobject.h.

Include vector BEFORE any of those.

And after that remove the circular header include error you probably get then.

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!