Functor question in Visual Studio 2010
<pre><code>#include &lt;iostream&gt;

class myFunctorClass
{
public:
    myFunctorClass(int x) : _x(x) {}
    int oprator() (int y) {return _x + y;}
private:
    int _x;
}

int main(void)
   {
       myFunctorClass addFive(5);
       std::cout &lt;&lt; addFive(6);
       std::cin.get();
       return 0;
   }
</code></pre>

<p>This is example code from here:
<a href="http://www.cprogramming.com/tutorial/functors-function-objects-in-c++.html" rel="nofollow">http://www.cprogramming.com/tutorial/functors-function-objects-in-c++.html</a></p>

<p>But I got errors:</p>

<pre><code>Error   5   error C2065: 'y' : undeclared identifier
</code></pre>

<p>and</p>

<pre><code>Error   2   error C2628: 'myFunctorClass' followed by 'int' is illegal (did you forget a ';'?)  
</code></pre>

<p>I don't have gcc now. Is this supposed to be compile under gcc or linux environment?
How to change it work in Visual Studio?</p>

<p>Update:
Problem solved.
I mis-spell operator
I lost one semicolon.</p>

<p>Thank you.</p>
