| 1 | namespace N0 { |
|---|---|
| 2 | namespace N1 { |
| 3 | |
| 4 | char *buf0 = nullptr; |
| 5 | char buf1[] = {0, 1, 2, 3, 4, 5, 6, 7}; |
| 6 | |
| 7 | char sum(char *buf, int size) { |
| 8 | char result = 0; |
| 9 | for (int i = 0; i < size; i++) |
| 10 | result += buf[i]; |
| 11 | return result; |
| 12 | } |
| 13 | |
| 14 | } // namespace N1 |
| 15 | } // namespace N0 |
| 16 | |
| 17 | int main() { |
| 18 | char result = N0::N1::sum(buf: N0::N1::buf1, size: sizeof(N0::N1::buf1)); |
| 19 | return 0; |
| 20 | } |
| 21 |
