Skip to content

Commit

Permalink
RELEASE v0.3.0-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
arakilian0 committed Nov 24, 2019
1 parent 9bfdcb1 commit 2f83785
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 13 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{txt}]
insert_final_newline = false

[*.{cpp,h}]
indent_size = 2
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

Binary file modified dist/mac/arakilian0
Binary file not shown.
100 changes: 100 additions & 0 deletions facts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
So far, has the most fun programming in C++!
Enjoy's a good street taco for sure.
Has never traveled to any Asian countries, but really wants to!
Would classify Blue Moon|Belgian White as 'Favorite Beer'.
18 changes: 18 additions & 0 deletions src/fact.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <iostream>
#include <string>
#include <array>
#include <cstdlib>
#include <ctime>

#include "fta.h"

using namespace std;

string fact () {
array<string, MAX_FACTS> FactArray = FileToArray("facts.txt");
srand((unsigned) time(0));
int RandomNumber = rand() % 100;

// cout << RandomNumber << endl;
return FactArray[RandomNumber];
}
3 changes: 0 additions & 3 deletions src/facts.txt

This file was deleted.

23 changes: 23 additions & 0 deletions src/fta.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <iostream>
#include <fstream>
#include <string>
#include <array>

#define MAX_FACTS 100

using namespace std;

array< string, MAX_FACTS > FileToArray(string ifile) {
array<string, MAX_FACTS> FactArray;
ifstream facts(ifile);
string Fact, RandomFact;
unsigned int FactArrayLength = 0;

while(getline(facts, Fact)) {
if (FactArrayLength < MAX_FACTS) {
FactArray[FactArrayLength++] = Fact;
}
}

return FactArray;
}
8 changes: 6 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
#include <string>

#include "os.h"
#include "fact.h"

using namespace std;

int main()
{
const std::string OS = os();
string OS = os();
string FACT = fact();

std::cout << OS << std::endl;
cout << FACT << endl;
return 0;
}
11 changes: 4 additions & 7 deletions src/os.h
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
#include <string>

std::string os ()
{
std::string platform;
using namespace std;

string os () {
string platform;

// mac ?
#if defined (__APPLE__)
{
platform = "darwin";
return platform;
}
#endif

// linux ?
#if defined (__linux__)
{
platform = "linux";
return platform;
}
#endif

// windows 32-bit ?
#if defined (__WIN32)
{
platform = "win32";
return platform;
}
#endif

// windows 64-bit ?
#if defined (__WIN64)
{
platform = "win64";
Expand Down

0 comments on commit 2f83785

Please sign in to comment.