Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- #include<fstream>
- #include <vector>
- using namespace std;
- class Polynom
- {
- public:
- int n;
- double *koef;
- Polynom();
- Polynom(int an);
- Polynom(const Polynom &);
- ~Polynom();
- int getn();
- double sum();
- double getkoef(int);
- Polynom operator+(const Polynom &);
- Polynom operator-(const Polynom &);
- Polynom operator*(const Polynom &);
- Polynom operator=(const Polynom &);
- friend ostream &operator<< (ostream &s, const Polynom &c);
- friend istream &operator >> (istream &s, Polynom &c);
- double &operator()(int i)
- {
- return koef[i];
- }
- };
- class Vec {
- public:
- vector <Polynom> a;
- //Polynom a;
- Vec();
- ~Vec();
- void insert(Polynom x);
- void erasee(int x);
- void reversee(vector <Polynom> a);
- Polynom &operator[](int x){
- return a[x];
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement