I came across a C++ struct definition with a constructor.
struct Foo
{
int x;
Foo( int _x ) : x(_x)
{
}
~Foo()
{
std::cout << "Destructing a Foo with x=" << x << "\n";
}
};
I know about member initializer but don't quite get what _x
means here? Can someone please enlighten me?