Advertisement
Guest User

Untitled

a guest
Sep 29th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. #include <vector>
  5. #include <algorithm>
  6. using namespace std;
  7. //namespace std {
  8. // string UserName;
  9. // string PassWord;
  10. //}
  11. //void DeleteInfo() {
  12. // ofstream DelInfo;
  13. // DelInfo.open("Myfile.txt");
  14. // DelInfo.clear();
  15. // DelInfo.close();
  16. // cout << "All of your info was removed from file ! " << endl;
  17. //}
  18. //bool ChechkFile() {
  19. // ifstream File("Myfile.txt");
  20. // if (File) {
  21. // return true;
  22. // }
  23. // return false;
  24. //}
  25. //
  26. //void LogIn(string EnteredUser, string EnteredPass) {
  27. //
  28. // cout << "Enter your Registered UserName " << endl;
  29. // cin >> EnteredUser;
  30. // cout << "Enter your Password " << endl;
  31. // cin >> EnteredPass;
  32. // ifstream CheckAcc;
  33. // CheckAcc.open("Myfile.txt");
  34. // CheckAcc >> UserName;
  35. // cout << "User from login func : " << UserName << endl;
  36. // CheckAcc >> PassWord;
  37. // cout << "Pass from login func : " << PassWord << endl;
  38. //
  39. // //check user and password
  40. //
  41. // if (EnteredUser == UserName && EnteredPass == EnteredPass) {
  42. // cout << "Log in is Succsesfull " << endl;
  43. // cout << "Do you want to remove all your info ? " << endl;
  44. // cout << "1 / 0 " << endl;
  45. // bool choose;
  46. // cin >> choose;
  47. // if (choose) {
  48. //
  49. // cout << "Are you Sure ? " << endl;
  50. // cout << "1 / 0 " << endl;
  51. // bool SureChoose;
  52. // cin >> SureChoose;
  53. // if (SureChoose)
  54. // DeleteInfo();
  55. // }
  56. // else LogIn(UserName, PassWord);
  57. // }
  58. // else
  59. // cout << "Incorrect User or Password" << endl;
  60. //}
  61. //
  62. //void CloseFile() {
  63. //
  64. // ifstream CloseFile;
  65. // CloseFile.close();
  66. //}
  67. //
  68. //void ChooseAction() {
  69. //
  70. // cout << "Do you want to LogIn ? " << endl;
  71. // cout << "1 / 0" << endl;
  72. // bool Action = false;
  73. // cin >> Action;
  74. // if (Action)
  75. //
  76. // LogIn(UserName, PassWord);
  77. //
  78. // else CloseFile();
  79. //}
  80. //
  81. //void RegisterForm(string User, string Pass) {
  82. //
  83. // if (ChechkFile()) {
  84. //
  85. // ofstream File;
  86. // File.open("Myfile.txt");
  87. // //registracia
  88. //
  89. // cout << "Enter UserName" << endl;
  90. // cin >> UserName;
  91. // File << UserName << endl;
  92. // cout << "Enter PassWord" << endl;
  93. // cin >> PassWord;
  94. // File << PassWord;
  95. // File.close();
  96. // }
  97. // else {
  98. // cout << "Creating Account ..." << endl;
  99. // ofstream CreateAcc;
  100. // CreateAcc.open("Myfile.txt");
  101. // }
  102. //
  103. //}
  104.  
  105. class test {
  106.  
  107. };
  108. int main() {
  109.  
  110. vector<string> vs;
  111.  
  112.  
  113. for (size_t i = 0; i < 3; i++)
  114. {
  115. string s ;
  116. cin >> s;
  117. vs.push_back(s);
  118. }
  119. for (auto item : vs)
  120. cout << item << endl;
  121. sort(vs.begin(), vs.end());
  122. for (auto item : vs)
  123. cout << item << endl;
  124.  
  125.  
  126.  
  127. //RegisterForm(UserName, PassWord);
  128. //ChooseAction();
  129. system("pause");
  130.  
  131. return 0;
  132.  
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement