Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <vector>
- #include <algorithm>
- using namespace std;
- //namespace std {
- // string UserName;
- // string PassWord;
- //}
- //void DeleteInfo() {
- // ofstream DelInfo;
- // DelInfo.open("Myfile.txt");
- // DelInfo.clear();
- // DelInfo.close();
- // cout << "All of your info was removed from file ! " << endl;
- //}
- //bool ChechkFile() {
- // ifstream File("Myfile.txt");
- // if (File) {
- // return true;
- // }
- // return false;
- //}
- //
- //void LogIn(string EnteredUser, string EnteredPass) {
- //
- // cout << "Enter your Registered UserName " << endl;
- // cin >> EnteredUser;
- // cout << "Enter your Password " << endl;
- // cin >> EnteredPass;
- // ifstream CheckAcc;
- // CheckAcc.open("Myfile.txt");
- // CheckAcc >> UserName;
- // cout << "User from login func : " << UserName << endl;
- // CheckAcc >> PassWord;
- // cout << "Pass from login func : " << PassWord << endl;
- //
- // //check user and password
- //
- // if (EnteredUser == UserName && EnteredPass == EnteredPass) {
- // cout << "Log in is Succsesfull " << endl;
- // cout << "Do you want to remove all your info ? " << endl;
- // cout << "1 / 0 " << endl;
- // bool choose;
- // cin >> choose;
- // if (choose) {
- //
- // cout << "Are you Sure ? " << endl;
- // cout << "1 / 0 " << endl;
- // bool SureChoose;
- // cin >> SureChoose;
- // if (SureChoose)
- // DeleteInfo();
- // }
- // else LogIn(UserName, PassWord);
- // }
- // else
- // cout << "Incorrect User or Password" << endl;
- //}
- //
- //void CloseFile() {
- //
- // ifstream CloseFile;
- // CloseFile.close();
- //}
- //
- //void ChooseAction() {
- //
- // cout << "Do you want to LogIn ? " << endl;
- // cout << "1 / 0" << endl;
- // bool Action = false;
- // cin >> Action;
- // if (Action)
- //
- // LogIn(UserName, PassWord);
- //
- // else CloseFile();
- //}
- //
- //void RegisterForm(string User, string Pass) {
- //
- // if (ChechkFile()) {
- //
- // ofstream File;
- // File.open("Myfile.txt");
- // //registracia
- //
- // cout << "Enter UserName" << endl;
- // cin >> UserName;
- // File << UserName << endl;
- // cout << "Enter PassWord" << endl;
- // cin >> PassWord;
- // File << PassWord;
- // File.close();
- // }
- // else {
- // cout << "Creating Account ..." << endl;
- // ofstream CreateAcc;
- // CreateAcc.open("Myfile.txt");
- // }
- //
- //}
- class test {
- };
- int main() {
- vector<string> vs;
- for (size_t i = 0; i < 3; i++)
- {
- string s ;
- cin >> s;
- vs.push_back(s);
- }
- for (auto item : vs)
- cout << item << endl;
- sort(vs.begin(), vs.end());
- for (auto item : vs)
- cout << item << endl;
- //RegisterForm(UserName, PassWord);
- //ChooseAction();
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement