I recommend using tmxlite (https://github.com/fallahn/tmxlite) or if you must sfml-tmxloader (https://github.com/fallahn/sfml-tmxloader).
Secondly you should learn some modern C++ where never use owning raw pointers and instead make use of unique (and shared) pointers and thus pretty much do away with manual memory management.
As for the crash:
image = tilesetElement->FirstChildElement("image");
std::string imagepath = image->Attribute("source");
It's most likely that FirstChildElement("image") returned nullptr and then you try to access it, causing an access violation, thus crash.
I recommend using tmxlite (https://github.com/fallahn/tmxlite) or if you must sfml-tmxloader (https://github.com/fallahn/sfml-tmxloader).
Secondly you should learn some modern C++ where never use owning raw pointers and instead make use of unique (and shared) pointers and thus pretty much do away with manual memory management.
As for the crash:
image = tilesetElement->FirstChildElement("image");
std::string imagepath = image->Attribute("source");
It's most likely that FirstChildElement("image") returned false and then you try to access it, causing an access violation, thus crash.
Thanks, it's rly returned false i'll try to use libs that u adviced