In Visual Studio 2019, debbuging SFML code, result this wrong: Exception thrown at 0x77D73320 (vcruntime140.dll) in example.exe: 0xC0000005: Access violation writing location 0x00761000. exactly after ("sound.wav")) the adress is correct, i try many others...C:\sound.wav; d:\sound.wav ; C:/sound/wav etc... It's a simple code. I indicated where is exactly the message. Debugged step by step and the error is exactly on ****** in the code...
#include <SFML/Audio.hpp>
int main()
{
sf::SoundBuffer buffer;
if (!buffer.loadFromFile("sound.wav")) ***** Debug: is exactly here that appears a wrong in a messagebox of Visual Studio: Exception thrown at 0x77D73320 (vcruntime140.dll) in example.exe: 0xC0000005: Access violation writing location 0x00761000
return -1;
sound.setBuffer(buffer);
sound.play();
return 0;
}
User contributions licensed under CC BY-SA 3.0