summaryrefslogtreecommitdiffstats
path: root/namespaces.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-12-08 12:58:04 +0100
committerNao Pross <naopross@thearcway.org>2018-12-08 12:58:04 +0100
commit05f2df34290af477b0fee49b75e5f56e1d6c83f9 (patch)
tree66a7214321c874be02d1a4a9b4fd3f489dc09ad8 /namespaces.hpp
downloadcplusplus-05f2df34290af477b0fee49b75e5f56e1d6c83f9.tar.gz
cplusplus-05f2df34290af477b0fee49b75e5f56e1d6c83f9.zip
Initial commit with kinda crappy unnumbered examples
Diffstat (limited to '')
-rw-r--r--namespaces.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/namespaces.hpp b/namespaces.hpp
new file mode 100644
index 0000000..dc8ef7c
--- /dev/null
+++ b/namespaces.hpp
@@ -0,0 +1,21 @@
+#pragma once
+
+// C++ introduces namespaces to separate various things
+// into logical blocks
+namespace math {
+ struct vec3i {
+ int x;
+ int y;
+ int z;
+ };
+
+ struct vec3d {
+ double x;
+ double y;
+ double z;
+ };
+
+
+ int dot(vec3i v, vec3i w);
+ double dot(vec3d v, vec3d w);
+}