Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- #include<fstream>
- #include <vector>
- #include <string>
- using namespace std;
- template <class T>
- class Polynom
- {
- public:
- int n;
- T *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 &);
- void print();
- friend ostream &operator<<<T>(ostream &s, const Polynom &c);
- double &operator()(int i)
- {
- return koef[i];
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement