#include <iostream>
struct Foo
{
static int s;
int x;
int y = 2; // 3
int z = 3; // 4
Foo()
: x{1} // 1
, z{4} // 4
{}
};
int Foo::s = 5; // 2
int main(int, char*[])
{
Foo foo{};
std::cout << "x: " << foo.x << std::endl;
std::cout << "y: " << foo.y << std::endl;
std::cout << "z: " << foo.z << std::endl;
std::cout << "s: " << Foo::s << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IEZvbwp7CglzdGF0aWMgaW50IHM7CglpbnQgeDsKCWludCB5ID0gMjsgIC8vIDMKCWludCB6ID0gMzsgIC8vIDQKCUZvbygpCgkJOiB4ezF9ICAvLyAxCgkJLCB6ezR9ICAvLyA0Cgl7fQp9OwoKaW50IEZvbzo6cyA9IDU7IC8vIDIKCmludCBtYWluKGludCwgY2hhcipbXSkKewoJRm9vIGZvb3t9OwoJc3RkOjpjb3V0IDw8ICJ4OiAiIDw8IGZvby54IDw8IHN0ZDo6ZW5kbDsKCXN0ZDo6Y291dCA8PCAieTogIiA8PCBmb28ueSA8PCBzdGQ6OmVuZGw7CglzdGQ6OmNvdXQgPDwgIno6ICIgPDwgZm9vLnogPDwgc3RkOjplbmRsOwoJc3RkOjpjb3V0IDw8ICJzOiAiIDw8IEZvbzo6cyA8PCBzdGQ6OmVuZGw7CgoJcmV0dXJuIDA7Cn0=