Advertisement
Guest User

hedder.h

a guest
Mar 20th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #include<iostream>
  2. #include<iomanip>
  3. #include<fstream>
  4. #include <vector>
  5. using namespace std;
  6. class Polynom
  7. {
  8. public:
  9. int n;
  10. double *koef;
  11. Polynom();
  12. Polynom(int an);
  13. Polynom(const Polynom &);
  14. ~Polynom();
  15. int getn();
  16. double sum();
  17. double getkoef(int);
  18. Polynom operator+(const Polynom &);
  19. Polynom operator-(const Polynom &);
  20. Polynom operator*(const Polynom &);
  21. Polynom operator=(const Polynom &);
  22. friend ostream &operator<< (ostream &s, const Polynom &c);
  23. friend istream &operator >> (istream &s, Polynom &c);
  24. double &operator()(int i)
  25. {
  26. return koef[i];
  27. }
  28. };
  29. class Vec {
  30. public:
  31. vector <Polynom> a;
  32. //Polynom a;
  33. Vec();
  34. ~Vec();
  35. void insert(Polynom x);
  36. void erasee(int x);
  37. void reversee(vector <Polynom> a);
  38. Polynom &operator[](int x){
  39. return a[x];
  40. }
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement