Sign in to follow this  
m4gnus

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

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;
}Cbatch;

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

class ngRenderer
{
private:

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

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> >).

Enigma

Share this post


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

map<int,vector<CBatch>>

should be:

map<int,vector<CBatch> >

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

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