diff options
| author | Alee <Alee14498@gmail.com> | 2019-01-31 16:26:53 -0500 |
|---|---|---|
| committer | Alee <Alee14498@gmail.com> | 2019-01-31 16:26:53 -0500 |
| commit | b13b1f0ece6aea0ba26432932e9c6ab2b6054636 (patch) | |
| tree | 5d778940a26a368f88894a963a86edf87bfdf950 /main.cpp | |
| parent | db61f21e6baaa605876784749214c8754e97fdd4 (diff) | |
| download | Project-Xeon-b13b1f0ece6aea0ba26432932e9c6ab2b6054636.tar.gz Project-Xeon-b13b1f0ece6aea0ba26432932e9c6ab2b6054636.tar.bz2 Project-Xeon-b13b1f0ece6aea0ba26432932e9c6ab2b6054636.zip | |
Removed JSON for data storage
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -3,39 +3,38 @@ #include <string> #include <fstream> #include <stdlib.h> -#include "dependencies/nlohmann/json.hpp" - -using json = nlohmann::json; int main() { int age; int year; + bool oobe = true; std::string username; int mainChoice; - std::ifstream i("database.json"); - json j; - i >> j; + if (oobe == true) + { 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, username); std::cout << "Hello "<< username << "!" << std::endl; - j["username"] = username; std::cout << "Press anything to continue!" << std::endl; std::getchar(); system("cls"); std::cout << "Select a year that you will be born in..." << std::endl; std::cin >> year; - j["year"] = year; std::cout << "The year is now " << year << "!" << std::endl; - std::getchar(); - + std::cout << "Press anything to continue!" << std::endl; + oobe = false; age = 0; age = age+1; year = year+1; std::cout << "You are now " << age << " and it's " << year << std::endl; std::getchar(); + } else { + std::cout << "Welcome back!" << std::endl; + } + std::getchar(); return 0; }
\ No newline at end of file |
