Created
February 10, 2025 17:22
-
-
Save Utshaw/723d009436d5cad550c4b046a0276727 to your computer and use it in GitHub Desktop.
namespace example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
namespace Math { | |
int add(int a, int b) { | |
return a + b; | |
} | |
} | |
int main() { | |
std::cout << Math::add(5, 3) << std::endl; // Outputs: 8 | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment