CJCoding With Joseph
15free / daySign inCreate account

Two Namespaces, Same Function Name

Namespaces let two functions share a name without clashing. Define two namespaces:
1) English with a function string greeting() that returns "Hello".
2) Spanish with a function string greeting() that returns "Hola".

The test will print English::greeting() then Spanish::greeting().

Do NOT write a main function.

Expected Output:

Hello
Hola

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
Namespaces
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.