1 | int a_function(int x) { |
---|---|
2 | return x * x; |
3 | } |
4 | |
5 | int a_function(double x) { |
6 | return static_cast<int>(x * x); |
7 | } |
8 | |
9 | int a_function(double x, int y) { |
10 | return y * y; |
11 | } |
12 | |
13 | int a_function(int x, double y) { |
14 | return static_cast<int>(y * y); |
15 | } |
16 | |
17 | int main(int argc, char const *argv[]) { |
18 | // This is a random comment. |
19 | |
20 | int int_val = 20; |
21 | double double_val = 20.0; |
22 | |
23 | int result = a_function(x: int_val); |
24 | result += a_function(x: double_val); |
25 | result += a_function(x: double_val, y: int_val); |
26 | result += a_function(x: int_val, y: double_val); |
27 | |
28 | return result; |
29 | } |
30 |