I understand that public private and protected serve the programmer to not get mixed up regarding the right way to modify data. Is there some sort of security risk associated with making some data public ? For exampl, let's say i make a game that uses the following class :
Class A
{
public:
int speed;
Vector2 position;
void render();
}
If someone was playing the game (from an executable), could there be some way for them to change the speed variable ?