what is wrong with my C++ templates
<p>I defined a template getsetter to set and get a vector set of values and derived a class (float type) from that template, works in unix but not red hat linux. Why?
can someoen help? Thanks a lot</p>

<pre><code> #ifndef _GETSET_H
 #define _GETSET_H

 #include &lt;iostream.h&gt;
 #include &lt;stdio.h&gt;
 #include &lt;stdlib.h&gt;
 #include &lt;string.h&gt;
 #include &lt;vector&gt;
 using namespace std;

 template &lt;typename T&gt;
 class getSet
 {
     protected:
         vector&lt;T&gt; value;
         typename::vector&lt;T&gt;::iterator itr;

         char  a_flVal[100];
         bool  flFlag;

     public:

     getSet()
     {
         flFlag = false;
     }   

     getSet(T p_val)
     {
         value.push_back(p_val);
     }   

     bool clear()
     {
         if( flFlag )
         {
             memset(a_flVal, 0, sizeof(a_flVal));
         }   
         else if( !value.empty() )
         {
             value.clear();
         }
         return(true);
     }

     bool empty()
     {
         bool retval = false;
         if( flFlag )
         {
            //if(a_flVal[0] == NULL)
             if (a_flVal[0] == '\0')
             {
                 retval = true;
             }
             else
             {
                 retval = isZero( a_flVal );
             }
         }
         else if( value.size() == 0 )
         {
             retval = true;
         }

         return(retval);
     }

     bool set(T p_val)
     {
         if( value.size() == 0 )
         {
             value.push_back(p_val);
         }
         else
         {
             itr = value.begin();
             *itr = p_val;
         }
         return(true);
     }

     virtual bool add(T p_val)
     {
         if( value.empty() )
         {
             value.push_back(p_val);
         }
         else
         {
             itr = value.begin();
             *itr = *itr + p_val;
         }
         return(true);
     }

     virtual string getString() throw (string)
     {
         throw string("Sorry, you cant call getString "
                      "from the parent class");
         return(string(""));
     }  
     T get()
     { 
         itr = value.begin();
         return(*itr);
     }   



 };  // end class getSet
 class getSetFloat : getSet&lt;float&gt;
 {
     private:
         string storeEqua;

     public:
     getSetFloat() : getSet()
     {
         flFlag = true;

     }

     bool set(float p_val)
     {
         if( value.empty() )
         {
             value.push_back(0);
         }
         memset(a_flVal, 0, sizeof(a_flVal));
         sprintf(a_flVal, "%.2f", p_val);
         return(true);
     }


     string get() throw (string)
     {
         return( string(a_flVal) );
     }


     bool add(string p_val)
     {
         add(atof(p_val.c_str()));
         return(true);
     }

     bool add(float p_val)
     {
         if( value.empty() )
         {
             value.push_back(0);
             memset(a_flVal, 0, sizeof(a_flVal));
             sprintf(a_flVal, "%.2f", p_val);
         }
         else
         {
             char buf[100];
             memset(buf, 0, sizeof(buf));
             sprintf(buf, "%.2f", atof(a_flVal) + p_val);
             memset(a_flVal, 0, sizeof(a_flVal));
             strcpy(a_flVal, buf);
         }
         return(true);
     }

 };  // end getSetFloat

 #endif
</code></pre>
