From ab3bc9a86613d9aca5da531595394b83c94669ff Mon Sep 17 00:00:00 2001 From: Alee Date: Sun, 27 Jan 2019 22:17:10 -0500 Subject: Things --- .gitignore | 2 +- .vscode/c_cpp_properties.json | 21 +++++++++++++++++++++ .vscode/settings.json | 44 +++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++++ build.bat | 4 ++-- main.cpp | 28 +++++++++++++++++++++++---- run.bat | 4 ++++ 7 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json create mode 100644 run.bat diff --git a/.gitignore b/.gitignore index 3110669..470195d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -a.exe \ No newline at end of file +out/game.exe diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..180ed08 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,21 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "windowsSdkVersion": "10.0.17763.0", + "compilerPath": "D:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.20.27027/bin/Hostx64/x64/cl.exe", + "cStandard": "c11", + "cppStandard": "c++17", + "intelliSenseMode": "msvc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..19c4f2d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,44 @@ +{ + "files.associations": { + "iostream": "cpp", + "cctype": "cpp", + "cmath": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "cwchar": "cpp", + "exception": "cpp", + "fstream": "cpp", + "initializer_list": "cpp", + "ios": "cpp", + "iosfwd": "cpp", + "istream": "cpp", + "limits": "cpp", + "memory": "cpp", + "new": "cpp", + "ostream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "string": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "typeinfo": "cpp", + "utility": "cpp", + "vector": "cpp", + "xfacet": "cpp", + "xiosbase": "cpp", + "xlocale": "cpp", + "xlocinfo": "cpp", + "xlocnum": "cpp", + "xmemory": "cpp", + "xmemory0": "cpp", + "xstddef": "cpp", + "xstring": "cpp", + "xtr1common": "cpp", + "xutility": "cpp" + }, + "C_Cpp.errorSquiggles": "Enabled" +} \ No newline at end of file diff --git a/README.md b/README.md index 4d888a6..f0d536c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # Project Xeon A text-based game made in C++ + +REQUIREMENTS TO COMPILE: + +- A C++ compiler (Such as g++) \ No newline at end of file diff --git a/build.bat b/build.bat index fbd2e82..f268c28 100644 --- a/build.bat +++ b/build.bat @@ -1,7 +1,7 @@ @echo off title Building C++ Program echo Building Program... -del a.exe -g++ -g main.cpp +mkdir out +g++ -g main.cpp -o out/game.exe echo Building Complete! pause>nul \ No newline at end of file diff --git a/main.cpp b/main.cpp index 95cc365..9c27f20 100644 --- a/main.cpp +++ b/main.cpp @@ -1,10 +1,30 @@ #include - -using namespace std; +#include +#include +#include + +void displayMenu() +{ + +} int main() { - cout << "Hello World!" << endl; - system("pause"); + int age; + int year = 2019; + std::string guy; + int mainChoice; + + std::cout << "Welcome to Project Xeon! A text-based game made in C++!" << std::endl; + std::cout << "Please enter your name..." << std::endl; + std::getline(std::cin, guy); + std::cout << "Hello "<< guy << "!" << std::endl; + + age = 0; + age = age+1; + year = year+1; + + std::cout << "You are now " << age << " and it's " << year << std::endl; + return 0; } \ No newline at end of file diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..b54e52a --- /dev/null +++ b/run.bat @@ -0,0 +1,4 @@ +@echo off +echo Running Game +out\game.exe +pause>nul \ No newline at end of file -- cgit v1.2.3