From 9e705a78d21a128a34a44f0b0161175dab9b982d Mon Sep 17 00:00:00 2001 From: Clayton Checkeye Date: Wed, 10 Feb 2016 12:39:49 -0500 Subject: [PATCH] This is only the first part of this program. I am still having some trouble figuring out what I am doing. --- ConfigGenerator/.idea/.name | 1 + ConfigGenerator/.idea/ConfigGenerator.iml | 26 +++ ConfigGenerator/.idea/encodings.xml | 6 + ConfigGenerator/.idea/misc.xml | 14 ++ ConfigGenerator/.idea/modules.xml | 8 + ConfigGenerator/.idea/workspace.xml | 263 ++++++++++++++++++++++ ConfigGenerator/CMakeLists.txt | 7 + ConfigGenerator/main.cpp | 77 +++++++ 8 files changed, 402 insertions(+) create mode 100644 ConfigGenerator/.idea/.name create mode 100644 ConfigGenerator/.idea/ConfigGenerator.iml create mode 100644 ConfigGenerator/.idea/encodings.xml create mode 100644 ConfigGenerator/.idea/misc.xml create mode 100644 ConfigGenerator/.idea/modules.xml create mode 100644 ConfigGenerator/.idea/workspace.xml create mode 100644 ConfigGenerator/CMakeLists.txt create mode 100644 ConfigGenerator/main.cpp diff --git a/ConfigGenerator/.idea/.name b/ConfigGenerator/.idea/.name new file mode 100644 index 0000000..1bdc507 --- /dev/null +++ b/ConfigGenerator/.idea/.name @@ -0,0 +1 @@ +ConfigGenerator \ No newline at end of file diff --git a/ConfigGenerator/.idea/ConfigGenerator.iml b/ConfigGenerator/.idea/ConfigGenerator.iml new file mode 100644 index 0000000..7b4be19 --- /dev/null +++ b/ConfigGenerator/.idea/ConfigGenerator.iml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ConfigGenerator/.idea/encodings.xml b/ConfigGenerator/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/ConfigGenerator/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ConfigGenerator/.idea/misc.xml b/ConfigGenerator/.idea/misc.xml new file mode 100644 index 0000000..3eb495b --- /dev/null +++ b/ConfigGenerator/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ConfigGenerator/.idea/modules.xml b/ConfigGenerator/.idea/modules.xml new file mode 100644 index 0000000..7aa1703 --- /dev/null +++ b/ConfigGenerator/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ConfigGenerator/.idea/workspace.xml b/ConfigGenerator/.idea/workspace.xml new file mode 100644 index 0000000..ec3834a --- /dev/null +++ b/ConfigGenerator/.idea/workspace.xml @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1455039738284 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ConfigGenerator/CMakeLists.txt b/ConfigGenerator/CMakeLists.txt new file mode 100644 index 0000000..a5c6af5 --- /dev/null +++ b/ConfigGenerator/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.3) +project(ConfigGenerator) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + +set(SOURCE_FILES main.cpp) +add_executable(ConfigGenerator ${SOURCE_FILES}) \ No newline at end of file diff --git a/ConfigGenerator/main.cpp b/ConfigGenerator/main.cpp new file mode 100644 index 0000000..a769be1 --- /dev/null +++ b/ConfigGenerator/main.cpp @@ -0,0 +1,77 @@ +#include +#include + +using std::cin; +using std::cout; +using std::endl; +using std::string; + +const string CONFIG_FILE_PATH = "/users/Clayton/documents/recipients.txt" +const string blank = ""; + +void init() { + + string name; + do { + std::cout << "Enter Your First Name and Last Name" << std::endl; + getline(cin, name); + } while (name == blank); + + string email; + do { + std::cout << "Enter Your Email Address" << std::endl; + getline(cin, email); + } while (email == blank); + + string cypher; + do { + std::cout << "Enter Your Cypher" << std::endl; + getline(cin, cypher); + } while (cypher == blank); + + string timezone_offset; + do { + std::cout << "Enter your Timezone Offset" << std::endl; + getline(cin, timezone_offset); + } while (timezone_offset == blank); + + string file_path; + do { + std::cout << "Enter Recipient's File Path" << std::endl; + getline(cin, file_path); + } while (file_path == blank); + + std::ofstream init_output_file; + init_output_file.open(file_path); + + init_output_file << name << endl; + init_output_file << email << endl; + init_output_file << cypher << endl; + init_output_file << timezone_offset << endl; + init_output_file << file_path << endl; + init_output_file.close(); +} + +void edit() { + bool file = true; + string edit_path; + std::cout << "Enter Path For Recipient" << endl; + cin >> edit_path; + + std::ifstream edited_file; + string name_edit = blank; + string email_edit = blank; + string cypher_edit = blank; + string timezone_offset_edit = blank; + edited_file.open(edit_path); + + + + + + + + +} + +