1#include <iostream>
2#include <string>
3
4namespace my_namespace {
5 void namespaced_function() {
6 std::cout << "Namespaced function" << std::endl;
7 }
8
9 class MyClass {
10 public:
11 void myMethod() {
12 std::cout << "Method inside class" << std::endl;
13 }
14 };
15}
16
17struct MyStruct {
18 int x;
19 void structMethod() {
20 std::cout << "Method inside struct" << std::endl;
21 }
22};
23
24void global_hello() {
25 std::cout << "Global hello" << std::endl;
26}
27
28int main() {
29 global_hello();
30 my_namespace::namespaced_function();
31 return 0;
32}