error: expected initializer before '<' token


#ifndef _TYPE_H_
#define _TYPE_H_

#include <string>
#include <map>
#include <vector>
#include <stdlib.h>


//颜色
typedef struct Color
{
	int r;
	int g;
	int b;
}mColor;

//位置
typedef struct point
{
	float x;
	float y;
}mPoint;

//范围
typedef struct area
{
	float w;
	float h;
}mArea;

//BMFont
typedef struct label
{
	std::string content;
	std::string fontName;
	mColor color;
	mPoint point;
	mArea area;	
}mLabel, *pLabel;

//数据
typedef struct dataStr
{
    std::string content;
    std::string fontName;
	mColor color;
	int type;
}sDataStr, *lpDataStr;

typedef map<int, sDataStr> mapData;

#endif
 
在 typedef map<int, sDataStr> mapData; 
报错 :error: expected initializer before '<' token
要加命名空间 using namespace std;
每天进步一点点。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM