remove that ; after the first #include

and I said clearly that TestMap.clear is a function not an attribute and should be

TestMap.clear( ); <----

The rest compiles fine here, noe warnings or errors and returns

Mark
Harry

I think you aren't too familiar with C programming to make these kinds of omissions, maybe you should invest time to learn C/C++ before trying to tackle this type of problem which is obviously a little intermediate to advanced stuff. This demo is simple, but it can get ugly quickly if you want to add more stuff to it.