Skip to content

bug #1

@LRoInT

Description

@LRoInT

gcc 12.2.0编译出错,报错如下:
In file included from Player.h:10,
from printer.h:10,
from game.cpp:11:
object.h: In function 'bool isEatable(GameObject)':
object.h:218:23: error: 'class std::unordered_map<GameObject, int>' has no member named 'contains'
218 | if (foodTastiness.contains(o)) {
| ^~~~~~~~
Player.h: In member function 'bool Player::digBlock(GameObject)':
Player.h:87:26: error: 'class std::unordered_map<GameObject, int>' has no member named 'contains'
87 | if (ToolDigLevel.contains(tool)) {
| ^~~~~~~~
Player.h: In member function 'void Player::loseObject(GameObject)':
Player.h:121:13: error: 'raise' was not declared in this scope
121 | raise(101);
| ^~~~~
命令:g++ -s game.cpp game.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions