jeudi 20 août 2015

'class std::map

Hi Guy's looking for some help and can't understand the problem. I'm following this tutorial http://ift.tt/1gZfosS, I'm using CodeBlocks 13.12 and SFML 2.1 but when I try to compile the code I get this

||=== Build: Debug in Test (compiler: GNU GCC Compiler) ===|
C:\Users\James\Desktop\Summer Repeats 2015\Games Dev 2\Test\src\Game_State_Start.cpp||In constructor 'GameStateStart::GameStateStart(Game*)':|
C:\Users\James\Desktop\Summer Repeats 2015\Games Dev 2\Test\src\Game_State_Start.cpp|100|error: 'class std::map<std::basic_string<char>, Gui>' has no member named 'emplace'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

This is the line of code giving me this error.

this->guiSystem.emplace("menu", Gui(sf::Vector2f(192, 32), 4, false, game->stylesheets.at("button"),
    { std::make_pair("Load Game", "load_game") }));

I have CodeBlocks set for C++11 and change SFML to SFML-2.3.1-windows-gcc-4.9.2-mingw-32-bit because I found here saying I have to use g++ 4.8.0 or higher on this page std::map emplace gcc 4.8.2, but still getting the same error, also the website give's me the code to download even though I'm trying to follow it myself , I checked the code, importing into a new project and that didn't work either, So no idea whats wrong. Any help or a point in the right direction would be most appreciated.

Aucun commentaire:

Enregistrer un commentaire