C++HW7 - /Homework #7 /This program will sort a list of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//Homework #7 //This program will sort a list of accounts, create logins for the accounts, and remove logins #include <iostream> #include <iomanip> #include <cmath> #include <fstream> #include <string> #include <cctype> using namespace std; void lower ( string s[], int len); void sort (string a[ ], int len); void display (string s[ ], int len); void login (string s[ ], int len); void search (string s[ ], int len, string login1, int & index, bool & found); void destroy (string s[], int & len, string login1); int main() { string login1; string s[20]; string s3( "exit" ); ifstream fin; int len = 0; fin.open ( "hw7.txt" ); if (fin.fail()) cout << "error" ; string account; getline(fin, account); while (!fin.fail()) { s[len] = account; len++; getline(fin, account); } lower (s, len); sort (s, len); login (s, len); do { display (s, len); cout << "Enter Login to be removed (Type exit to quit): " ; cin >> login1; if (login1 != s3) { destroy (s, len, login1); } else { return (0); } } while (login1 != s3); }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

C++HW7 - /Homework #7 /This program will sort a list of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online