aboutsummaryrefslogtreecommitdiff
path: root/CST 126/Homework 1/helpers.hpp
blob: 82257221123d3631178922590e04f04db835a1fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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