From c853f4d0f16b61f8cfddd824423090cabb389086 Mon Sep 17 00:00:00 2001 From: erikgoe Date: Sun, 24 Jan 2021 18:27:48 +0100 Subject: [PATCH] Add simple hello world structure --- .clang-format | 19 +++++++++++++++++++ .gitignore | 1 + README.md | 4 ++++ terminalDonut.cpp | 7 +++++++ 4 files changed, 31 insertions(+) create mode 100644 .clang-format create mode 100644 .gitignore create mode 100644 terminalDonut.cpp diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..4f1cbc0 --- /dev/null +++ b/.clang-format @@ -0,0 +1,19 @@ +BasedOnStyle: Google +AccessModifierOffset: -4 +AlignTrailingComments: false +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +ColumnLimit: 120 +ConstructorInitializerIndentWidth: 8 +Cpp11BracedListStyle: false +IndentCaseLabels: false +IndentWidth: 4 +MaxEmptyLinesToKeep: 3 +SortIncludes: false +SpaceAfterCStyleCast: true +SpaceBeforeAssignmentOperators: true +SpacesInParentheses: true +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +UseTab: Never diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9bd2b7c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +terminalDonut diff --git a/README.md b/README.md index 2ae4ed7..a59b122 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,7 @@ Original work: https://www.a1k0n.net/2011/07/20/donut-math.html ## The challenge How long does it take for you to write a terminal program from scratch, which renders the same (or a similar) donut as above? No stackoverflow, no libraries (except terminal IO), no other sources. No preparation time. I did not read Andy's blog post before i started, just watched Joma's video. It's only allowed to look up elementary things (like how to clear the terminal window). Use any programming language you want. That said, let's start! + +## How to run + g++ terminalDonut.cpp -o terminalDonut + ./terminalDonut diff --git a/terminalDonut.cpp b/terminalDonut.cpp new file mode 100644 index 0000000..8ba7cfc --- /dev/null +++ b/terminalDonut.cpp @@ -0,0 +1,7 @@ +#include + +int main() { + std::cout << "Hello terminalDonut" << std::endl; + + return 0; +}