aboutsummaryrefslogtreecommitdiff
path: root/CST 126/Homework 1/helpers.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST 126/Homework 1/helpers.hpp')
-rw-r--r--CST 126/Homework 1/helpers.hpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/CST 126/Homework 1/helpers.hpp b/CST 126/Homework 1/helpers.hpp
new file mode 100644
index 0000000..8225722
--- /dev/null
+++ b/CST 126/Homework 1/helpers.hpp
@@ -0,0 +1,44 @@
+#ifndef HELPERS_HPP
+#define HELPERS_HPP
+
+#include <random>
+
+typedef unsigned long long uLong;
+typedef unsigned char BYTE;
+
+inline int Random(const int& lowest, const int& highest)
+{
+ std::random_device rd;
+ std::mt19937 gen(rd());
+ std::uniform_int_distribution<int> dis(lowest, highest);
+ const int random_number = dis(gen);
+ return random_number;
+}
+
+inline void GenerateRandomNumbers(int arrayToFill[], const int& size)
+{
+ std::random_device rd;
+ std::mt19937 gen(rd());
+ std::uniform_int_distribution<int> dis(0, size);
+ for (auto i = 0; i < size; ++i)
+ {
+ const int random_number = dis(gen);
+ arrayToFill[i] = random_number;
+ }
+}
+inline int add(int num, char myChar)
+{
+ return num + myChar;
+}
+inline int add(int num, int num2, int num3)
+{
+ return num + num2 + num3;
+}
+inline int add(int num, int num2, int num3, int num4)
+{
+ return num + num2 + num3 + num4;
+}
+
+
+
+#endif