Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- #include <algorithm>
- using namespace std;
- class person
- {
- private:
- string name, s_name;
- int age;
- public:
- void set_info(string name, string s_name, int age)
- {
- name=name;
- s_name=s_name;
- age=age;
- }
- void get_info()
- {
- cout<<"saxelia"<<name;
- cout<<"gvaria"<<s_name;
- cout<<"asakia"<<age;
- }
- };
- class my_class
- {
- private:
- string c_name;
- int raod;
- vector<person>moswavleebi;
- person maswavlebeli;
- public:
- void get_info(string c_name, int raod, person maswavlebeli)
- {
- c_name=c_name;
- raod=raod;
- maswavlebeli=maswavlebeli;
- }
- void cout_info()
- {
- for (int i = 0; i < moswavleebi.size(); ++i)
- {
- cout<<moswavleebi[i];
- }
- }
- void get_t_info()
- {
- return maswavlebeli.get_info();
- }
- string class_name()
- {
- return c_name;
- }
- int number_info()
- {
- return raod;
- }
- };
- int main()
- {
- string name, s_name;
- int age;
- string c_name;
- int raod;
- cin>>raod;s
- vector<person>moswavleebi;
- person maswavlebeli;
- my_class m;
- person p;
- for (int i = 0; i <raod; ++i)
- {
- p.set_info(name,s_name,age);
- moswavleebi.push_back(p);
- m.get_info(c_name,raod,maswavlebeli);
- }
- p.get_info();
- m.cout_info();
- m.get_t_info();
- m.class_name();
- m.number_info();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement