error C2059: syntax error : '.'
<p>I am trying to get this function to work, but I keep getting </p>

<blockquote>
  <p>error C2059: syntax error : '.'</p>
</blockquote>

<p>on the lines of the two declare() function bodies where I call is_declared, and I can't figure it out.  I know it has to do with is_declared, but I am having trouble.</p>

<hr>

<pre><code>class Variable {    
public: 
    std::string name;
    double value;
    char type;      
    Variable(std::string n, double v) :name(n), value(v), type('v') { }
    Variable(std::string n, double v, char a) :name(n), value(v), type('c') { }
};

class Symbol_table {
public:
    Symbol_table();
    double get(std::string s);
    void set(std::string s, double d);
    bool is_declared(std::string s);
    double declare(std::string var, double val);
    double declare(std::string var, double val, char c);
private:
    std::vector&lt;Variable&gt; var_table;
};
Symbol_table::Symbol_table() {}
double Symbol_table::get(std::string s)     
{
for (int i = 0; i&lt;var_table.size(); ++i)
    if (var_table[i].name == s) return var_table[i].value;
error("get: undefined name ",s);
}
void Symbol_table::set(std::string s, double d) 
{
for (int i = 0; i&lt;=var_table.size(); ++i)
    if (var_table[i].name == s) {
        if (var_table[i].type == 'c') error("set_value: Cannot change a constant's value");
        var_table[i].value = d;
        return;
    }
error("set: undefined name ",s);
}
double Symbol_table::declare(std::string var, double val)
{//error here
    if (Symbol_table.is_declared(var)) error(var," declared twice");
    var_table.push_back(Variable(var,val));
    return val;
}
double Symbol_table::declare(std::string vari, double valu, char c)
{//error here
    if (Symbol_table.is_declared(vari)) error(vari," declared twice");
    var_table.push_back(Variable(vari,valu,c));
    return valu;
}
bool Symbol_table::is_declared(std::string s)   
{
for (int i = 0; i&lt;var_table.size(); ++i)
    if (var_table[i].name == s) return true;
    return false;
}
</code></pre>
