sourceFile compiler errors - common issue
<p>there are 26 errors in this one sourceFile that I obtained from sourceForge. It is part of the <a href="http://sourceforge.net/projects/progabstrlib/" rel="nofollow">Stanford CS106B library</a> so should not have any errors.</p>

<p>A sample of errors:</p>

<ul>
<li>C2059: syntax error : 'public C2990: 'Iterator' : non-class template
has already been declared as a class template </li>
<li>C2255: 'friend' : not allowed outside of a class definition </li>
<li>C2146: syntax error : missing ';' before identifier 'foreachHook' </li>
<li>C4430: missing type specifier - int assumed. Note: C++ does not support default-int </li>
<li>C2065: 'FE_State': undeclared identifier</li>
</ul>

<p>with this many errors, intuition is that there is probably one simple reason not 26 complicated reasons.</p>

<pre><code>/*
 * File: private/bst.h
 * Last modified on Fri Jun  5 15:40:43 2009 by eroberts
 * -----------------------------------------------------
 * This file contains the private section of the bst.h interface.
 * This portion of the class definition is taken out of the bst.h
 * header so that the client need not have to see all of these
 * details.
 */

public:

/*
 * Class: BST&lt;ElemType&gt;::Iterator
 * ------------------------------
 * This interface defines a nested class within the BST template that
 * provides iterator access to the keys contained in the BST.
 */

    class Iterator {
    public:
        Iterator();
        bool hasNext();
        ElemType next();

    private:
        struct iteratorMarkerT {
            void *np;
            bool processed;
        };

        Iterator(BST *bstp);
        BST *bstp;
        Stack&lt;iteratorMarkerT&gt; stack;
        long timestamp;
        void advanceToNextNode();
        void findLeftmostChild();
        friend class BST;
    };
    friend class Iterator;
    ElemType foreachHook(FE_State &amp; _fe);

/*
 * Deep copying support
 * --------------------
 * This copy constructor and operator= are defined to make a
 * deep copy, making it possible to pass/return trees by value
 * and assign from one tree to another. The entire contents of
 * the tree, including all elements, are copied. Each tree
 * element is copied from the original tree to the copy using
 * assignment (operator=). Making copies is generally avoided
 * because of the expense and thus, trees are typically passed
 * by reference, however, when a copy is needed, these operations
 * are supported.
 */
    const BST &amp; operator=(const BST &amp; rhs);
    BST(const BST &amp; rhs);

private:

/* Type definition for node in the tree */
    struct nodeT {
        ElemType data;
        nodeT *left, *right;
        int bf;    /* AVL balance factor */
    };

/* Constant definitions */
    static const int BST_RIGHT_HEAVY = +1;
    static const int BST_IN_BALANCE = 0;
    static const int BST_LEFT_HEAVY = -1;

/* Instance variables */
    nodeT *root;
    int numNodes;
    long timestamp;
    int (*cmpFn)(ElemType, ElemType);

/* Private method prototypes */
    nodeT *recFindNode(nodeT *t, ElemType &amp; key);
    bool recAddNode(nodeT * &amp; t, ElemType &amp; key, bool &amp; createdNewNode);
    bool recRemoveNode(nodeT * &amp; t, ElemType &amp; key, bool &amp; didRemove);
    bool removeTargetNode(nodeT * &amp; t);
    void updateBF(nodeT * &amp; t, int bfDelta);
    void recDeleteTree(nodeT *t);
    void recBSTAll(nodeT *t, void (*fn)(ElemType));
    void fixRightImbalance(nodeT * &amp; t);
    void fixLeftImbalance(nodeT * &amp; t);
    void rotateRight(nodeT * &amp; t);
    void rotateLeft(nodeT * &amp; t);
    void copyOtherEntries(const BST &amp; other);

/* Template method prototypes */

    template &lt;typename ClientDataType&gt;
    void recBSTAll(nodeT *t, void (*fn)(ElemType, ClientDataType &amp;),
                   ClientDataType &amp; data);
</code></pre>
