Are you talking about this editor? If so, it states right away:
General purpose tile map editor with XML-based map format
So you could just use a good, general purpose XML library such as rapidxml.
After that it's just a matter of following the TMX specification. In other words, you will simply need to ask the XML library to fetch you the nodes and attributes you need from that list, which is usually a trivial task.
PS: It also seems to be capable of exporting to JSON format, in which case you could use a JSON library instead (e.g. this).
But yes there seems to be a parser for this format available. A quick search returned this
I have never tested it, but give it a try.
If you don't want to install SVN just to download it, you can use DownloadSVN (I've tested it, and it works - no need to install anything)
And since you need an example of how to use it, here it is (based on this link):
- Create a new instance of type
Tmx::Map.
- Call
Map::ParseFile() passing it the path to your map file.
- Check for errors using
Map::HasError().
- Iterate through tilesets using
Map::GetTileset() and Map::GetNumTilesets(). Get individual tile information inside the tileset using Tileset::GetTile().
- Iterate through layers using
Map::GetLayer() and Map::GetNumLayers(). Use Layer::GetTileGid(y,x) to get the ID of a specific tile in the layer.
- Iterate through object groups using
Map::GetObjectGroup() and Map::GetNumObjectGroups(). Iterate through objects inside each group using ObjectGroup::GetObject() and ObjectGroup::GetNumObjects().
For individual properties on each of these objects, check the link.