C++
x
13
1
2
3
struct MyStruct {
4
int a = 1;
5
};
6
7
int main(void) {
8
MyStruct s2{};
9
10
std::cout << s2.a << '\n';
11
return 0;
12
}
13
$ g++ prog.cc -Wall -Wextra -std=c++11
Start
1
0
Finish
C++
struct MyStruct {
int a = 1;
};
int main(void) {
MyStruct s2{};
std::cout << s2.a << '\n';
return 0;
}
$ g++ prog.cc -Wall -Wextra -std=c++11
Start
1
0
Finish