could some please explain this syntax for C++ functor
I was interested is the colon : after add_x(int x)Code:struct add_x { add_x(int x) : x(x) {} // please expain this int operator()(int y) { return x + y; } // and this
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 8 of 8
Thread: PLease explain this syntaxThreaded View
|
Click Here to Expand Forum to Full Width |