令牌之前应为非限定 ID ')'

expected unqualified-id before ')' token

本文关键字:ID 令牌      更新时间:2023-10-16
#ifndef MAP_H_INCLUDED
#define MAP_H_INCLUDED
class Map()
{
public:
Map::Map();
Map::~Map();
unsigned int width,height;
Tile** mapTiles;
};
#endif

我只是想声明一个类,几分钟前它工作正常,现在它只是无法编译

这应该只是Map()~Map(),而不是Map::Map()Map::~Map()

哦,应该是class Map而不是class Map().