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