Added initial files
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
all:
|
||||
cc *.cpp -O3 -Wall -Wextra -std=c++17 -o lottery
|
||||
|
||||
compile:
|
||||
cc *.cpp -O3 -c
|
||||
|
||||
debug:
|
||||
cc *.cpp -g -std=c++17 -o calculator -lstdc++ -lm
|
||||
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
constexpr int MAX_VALUES = 100;
|
||||
constexpr int DEFAULT_NR_ENTRIES = 10;
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "input_parsing.h"
|
||||
#include "constants.h"
|
||||
|
||||
ProgramOptions get_params(int argc, char *argv[])
|
||||
{
|
||||
int max_range = MAX_VALUES, num_entries = DEFAULT_NR_ENTRIES;
|
||||
bool is_seed_specified = false;
|
||||
|
||||
int option;
|
||||
|
||||
while (( option = getopt_long(argc, argv, ""
|
||||
|
||||
return {max_range, num_entries, seed};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
struct ProgramOptions
|
||||
{
|
||||
int max_range = 0;
|
||||
int num_entries = 0;
|
||||
std::optional<int> seed;
|
||||
};
|
||||
|
||||
ProgramOptions get_params();
|
||||
Reference in New Issue
Block a user