Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Here's what I have at the moment. Still isn't correctly comparing the… #15

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Assignment2-1/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Assignment2-1/.idea/Assignment2-1.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Assignment2-1/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Assignment2-1/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assignment2-1/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

265 changes: 265 additions & 0 deletions Assignment2-1/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Assignment2-1/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.3)
project(Assignment2_1)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES main.cpp)
add_executable(Assignment2_1 ${SOURCE_FILES})
55 changes: 55 additions & 0 deletions Assignment2-1/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#include <iostream>
#include <fstream>
#include <limits>

using namespace std;

int main(int argc, char *argv[]) {
std::string Username = "";
do {
std::cout << "Enter your name(first and last)" << std::endl;
getline(std::cin, Username);
}while (Username == "");

std::string Email = "";
do {
std::cout << "Enter your Email address" << std::endl;
getline(std::cin, Email);
}while (Email == "");

std::string Pass = "";
do {
std::cout << "Enter your password" << std::endl;
getline(std::cin, Pass);
}while (Pass == "");

std::string Timezone = "";
do {
std::cout << "Enter your timezone" << std::endl;
getline(std::cin, Timezone);
}while (Timezone == "");

std::string Location = "knownrecipients.txt";
std::ofstream textfile;
textfile.open(Location);

textfile << "[Username]" << std::endl << Username << std::endl;
textfile << "[Email]" << std::endl << Email << std::endl;
textfile << "[Password]" << std::endl <<Pass << std::endl;
textfile << "[Timezone]" << std::endl << Timezone << std::endl;
textfile.close();


string line;
ifstream myfile (Location);
while (! myfile.eof() ) {
for (int lineno = 0; getline (myfile,line) && lineno < 7; lineno++)
if (lineno == 3)
cout << "Current Username is " << line << endl;
}
myfile.close();



return 0;
}
1 change: 1 addition & 0 deletions Assignment2/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading