1 | struct C { |
---|---|
2 | int func() { return 111; } |
3 | int func() const { return 222; } |
4 | |
5 | int const_func() const { return 333; } |
6 | int nonconst_func() { return 444; } |
7 | }; |
8 | |
9 | int main() { |
10 | C c; |
11 | const C const_c; |
12 | c.func(); |
13 | c.nonconst_func(); |
14 | const_c.func(); |
15 | c.const_func(); |
16 | return 0; // break here |
17 | } |
18 |