I am new to Box2D, and I wanted to create a body that would SetUserData of 2 different players but it results in "Exception thrown at 0x01011007 in ConsoleApplication1.exe: 0xC0000005: Access violation writing location 0x00000094."
I already tried to do player_body[0]->SetUserData("player1"); but it says cannot convert from const char to void*
b2Body* player_body[2];
player_body[0]->SetUserData((void*)"player1");
player_body[1]->SetUserData((void*)"player2");
User contributions licensed under CC BY-SA 3.0