Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. double sqrt(double); // the square root function takes a double
  2.  
  3. class Vector {
  4. public:
  5. Vector(int s);
  6. double& operator[](int i);
  7. int size();
  8.  
  9. private:
  10. double* elem; // elem points to an array of sz doubles
  11. int sz;
  12. };
  13.  
  14. Vector::Vector(int s) : elem {new double[s]}, sz{s}
  15. {}
  16.  
  17. d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement