Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include <chrono>
- #include <thread>
- #include <vector>
- #include <string>
- using namespace std;
- int main() {
- class person {
- public:
- //Название, Вид собственности, Адрес, Телефон, Контактное лицо
- string name; string own; string adress; int numbertel; string persnname;
- private:
- };
- vector<person> listperson;
- //--------------------------------------------------------------------------------------//
- cout << "Start" << endl << endl;
- cout << "1. Create new person. " << endl;
- cout << "2. Create new type credit. " << endl;
- cout << "3. Show list person. " << endl;
- cout << "4. Show list type credit. " << endl << endl;
- int choise1;
- cout << "Enter number: ";
- cin >> choise1;
- if (choise1 == 1) {
- char chek = 'k';
- while (chek != 'n') {
- person buffer;
- cout << endl << "Enter name: ";
- cin >> buffer.name;
- cout << "Enter own: ";
- cin >> buffer.own;
- cout << "Enter adress: ";
- cin >> buffer.adress;
- cout << "Enter numbertel: ";
- cin >> buffer.numbertel;
- cout << "Enter persname: ";
- cin >> buffer.persnname;
- listperson.push_back(buffer);
- cout << "Next? (y/n): ";
- cin >> chek;
- }
- cout >> listperson [0];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement