STL from win

Help me please with STL source code that works on Windows
I've found on Inet STL MRU Cache (it compiles fine with Studio 2008), but when trying to build it with Kdevelop (g++ is the compiler) I've got a series of error. One of them I've placed in the source code. If it's important I can post here log with full error list, but fighting this error is major.
If you know the solution please post.
Thanks beforehands, Alex

//Source code
#include <list>

#include <map>

/**

  • MRU Cache
    *

  • contains up to a fixed size of "Most Recently Used" items, where items are assiciated with keys.

  • when asked to fetch a value that is not in the cache, HandleNonExistingKeyFetch is called.

  • when an item is removed from the cache, HandleItemRelease is called.

  • implementor of this cache must provide those methods.
    *
    */
    template <typename key_type, typename value_type>
    class MruCache
    {
    public:

    const int maxLength;

    MruCache(int iMaxLength) : maxLength(iMaxLength) { }

    inline value_type FetchItem(key_type key) { return __fetch_item(key); }

    virtual ~MruCache() { Clear(); }

    /**

    • clear the cache.
    • for every item contained, HandleItemRelease is called.
      */
      virtual void Clear() { __clear(); }

protected:

virtual void HandleItemRelease\(key_type key, value_type value\) \{ \};

virtual value_type HandleNonExistingKeyFetch\(key_type key\) = 0;

private:

typedef struct _Entry
\{
    key_type key;
    value_type value;
\} Entry;

typedef std::list&lt;Entry&gt; EntryList;
EntryList listOfEntries;

/**
 * for fast search in the cache. this map contains pointers to iterators in EntryList.
 */
typedef std::map&lt;key_type, void*&gt; ItrPtrMap;
ItrPtrMap mapOfListIteratorPtr;

value_type \_\_fetch\_item\(key_type key\)
\{
    Entry entry;

//Error bangs on the line below, "ptrItr not found in the scope"
EntryList::iterator* ptrItr = (EntryList::iterator*) mapOfListIteratorPtr[key];
if (!ptrItr)
{
if ( (int)listOfEntries.size() >= maxLength)
{
Entry lruEntry = listOfEntries.back();
HandleItemRelease(lruEntry.key, lruEntry.value);
listOfEntries.pop_back();
delete mapOfListIteratorPtr[lruEntry.key];
mapOfListIteratorPtr.erase(lruEntry.key);
}

        entry.value = HandleNonExistingKeyFetch\(key\);
        entry.key = key;
        listOfEntries.push_front\(entry\);

        EntryList::iterator* ptrItr = new EntryList::iterator\(\);
        *ptrItr = listOfEntries.begin\(\);
        mapOfListIteratorPtr[key] = ptrItr;
    \}
    else
    \{
        entry = \*\(*ptrItr\);
        listOfEntries.erase\(*ptrItr\);
        listOfEntries.push_front\(entry\);
        *ptrItr = listOfEntries.begin\(\);
    \}
    return entry.value;
\}

virtual void __clear\(\)
\{
    for \(ItrPtrMap::iterator i=mapOfListIteratorPtr.begin\(\); i!=mapOfListIteratorPtr.end\(\); i\+\+\)
    \{
        void* ptrItr = i-&gt;second;
        EntryList::iterator* pItr = \(EntryList::iterator*\) ptrItr;
        HandleItemRelease\( \(*pItr\)-&gt;key, \(*pItr\)-&gt;value \);
        delete ptrItr;
    \}
    listOfEntries.clear\(\);
    mapOfListIteratorPtr.clear\(\);
\}

};