Skip to main content
gamedev.net
🔒 Locked

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

Started by m4gnus 3 replies 1.2k views
Original Post
m4gnus
m4gnus
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
"There are 10 types of people in the world... those who understand binary and those who don't."
Enigma
Enigma
Check the capitalisation of CBatch and also add a space inbetween the closing angle brackets (map<int,vector<CBatch> >).

Enigma
m4gnus
m4gnus
omg i really forgot to include <map>...sry about that

thx

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.