Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- File: Point2D.h
- Author: *REDACTED*
- Created: *REDACTED*
- Desc: File containing the class definition for Point2D
- */
- #pragma once
- class Point2D
- {
- public:
- // Default constructor
- Point2D() { x = 0.0f; y = 0.0f; }
- // Parameterized constructor
- Point2D(float xVal, float yVal) { x = xVal; y = yVal; }
- // Copy constructor
- Point2D(const Point2D& other) { x = other.x; y = other.y; }
- // Assignment operator
- void operator=(const Point2D & other) { x = other.x; y = other.y; }
- // Destructor
- ~Point2D() {};
- float x;
- float y;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement