Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. #include<iostream>
  2. #include <chrono>
  3. #include <thread>
  4. #include <vector>
  5. #include <string>
  6.  
  7. using namespace std;
  8.  
  9. int main() {
  10. class person {
  11. public:
  12. //Название, Вид собственности, Адрес, Телефон, Контактное лицо
  13. string name; string own; string adress; int numbertel; string persnname;
  14. private:
  15. };
  16. vector<person> listperson;
  17.  
  18. //--------------------------------------------------------------------------------------//
  19.  
  20. cout << "Start" << endl << endl;
  21. cout << "1. Create new person. " << endl;
  22. cout << "2. Create new type credit. " << endl;
  23. cout << "3. Show list person. " << endl;
  24. cout << "4. Show list type credit. " << endl << endl;
  25.  
  26. int choise1;
  27. cout << "Enter number: ";
  28. cin >> choise1;
  29.  
  30. if (choise1 == 1) {
  31. char chek = 'k';
  32. while (chek != 'n') {
  33. person buffer;
  34. cout << endl << "Enter name: ";
  35. cin >> buffer.name;
  36. cout << "Enter own: ";
  37. cin >> buffer.own;
  38. cout << "Enter adress: ";
  39. cin >> buffer.adress;
  40. cout << "Enter numbertel: ";
  41. cin >> buffer.numbertel;
  42. cout << "Enter persname: ";
  43. cin >> buffer.persnname;
  44.  
  45. listperson.push_back(buffer);
  46.  
  47. cout << "Next? (y/n): ";
  48. cin >> chek;
  49. }
  50. cout >> listperson [0];
  51.  
  52. }
  53. return 0;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement