Try to compile I got the following:
error C2664: 'std::list<_Ty>::list(const std::allocator<_Ty> &)' : cannot convert parameter 1 from 'const std::string' to 'const std::allocator<_Ty> &' c:\program files (x86)\microsoft visual studio 9.0\vc\include\utility
It will be the same error if I do just like that as well:

Code:

ShowMeMap (&myComplicatedMap, "Text_Test2",false);
return 0;
}

What Iím missing here? Can it be corrected? Is there work around (besides to make another template function)?
Regards

As far as I understand you're trying to insert a pair of type <int, string> and it works fine for the first call of ShowMeMap but the second call expects <int, list<string> > however you're still inserting a pair of type <int, string>.

I think you're over complicating this, anyway I think this could be solved with template specialization but maybe someone can give a better answer.

Thanks sugarfree,
Yes, you understood correctly my intentions
It might be overcomplicated, it is not the problem I'm trying to solve, this is more my curiosity
If it is not the way to use it - fine,
once again, thanks

Btw, you don't need to specify the type...
ShowMeMap <int,list<string>>(&myComplicatedMap, "Text_Teste2",false);
...can be:
ShowMeMap(&myComplicatedMap, "Text_Teste2",false);
The compiler will figure out the type.
And use references instead of pointers.

Originally Posted by Adak

io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.

Originally Posted by Salem

You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.