Advertisement Jump to content
Sign in to follow this  

'myClass::map':missing storage-class or type specifiers?!

This topic is 4888 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 For some reason i cannot create a map in my class... i declare a vector right under it and the vector works. I'm using namespace sd; so i have no clue why my map doesn't work :( my little class:
#pragma once
#include "ngMaterial.h"
#include "BaseMesh.h"
using namespace std;

typedef struct _CBATCH_ 
CBaseMesh *pMesh;
ngMaterial mat;

//typedef std::vector<Cbatch> batchList;

class ngRenderer

	map<int,vector<CBatch>> sortedBatches;
	vector<Cbatch> batches;
	void render();
	void addMesh(CBaseMesh *pMesh,ngMaterial mat);

What's wrong with this? regards, m4gnus

Share this post

Link to post
Share on other sites
Check the capitalisation of CBatch and also add a space inbetween the closing angle brackets (map<int,vector<CBatch> >).


Share this post

Link to post
Share on other sites
Oh yeah (duh) should've seen the two closing angle brackets...


should be:

map<int,vector<CBatch> >

otherwise, you have the right-shift operator '>>'

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!