Re: Deserialize JSON to C++ vector
WHy I have to be so fucking stupid? here's my problematic function:
int player::move_player(int move_by_value, direction d)
{
switch (d)
{
case _d.up:
player::player_position ++move_by_value;
return player::player_position;
break;
case d.down:
player::player_position -= move_by_value;
break;
}
And direction.h
//direction.h
//ENumeracja opisuje kierunek, w którym porusza się gracz
#pragma once
enum direction
{
up,
down
};And the error I get:
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier "_d" is undefined Gra Na Informatykę C:\Users\nuno6\source\repos\Gra Na Informatykę\Gra Na Informatykę\player.cpp 65
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector