Added initial files

This commit is contained in:
Alexandru
2026-09-07 23:45:30 +03:00
parent 43b702fa23
commit 2612a97330
6 changed files with 47 additions and 0 deletions
+8
View File
@@ -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
+4
View File
@@ -0,0 +1,4 @@
#pragma once
constexpr int MAX_VALUES = 100;
constexpr int DEFAULT_NR_ENTRIES = 10;
+14
View File
@@ -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};
}
+12
View File
@@ -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();
Executable
BIN
View File
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
#include "input_parsing.h"
#include <iostream>
int main(int argc, char *argv[])
{
auto parameters = get_params();
return 0;
}