Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdafx.h>
- #include <Rectangle.h>
- Rectangle::Rectangle(int width, int height)
- {
- : m_width(width)
- , m_height(height)
- }
- void Rectangle::SetWidth(const int width)
- {
- m_width = width;
- }
- int Rectangle::GetWidth() const
- {
- return m_width;
- }
- void Rectangle::SetWidth(const int width)
- {
- m_width = width;
- }
- bool Rectangle::operator!=(const Rectangle& second) const //neterminat
- {
- return m_height == second.m_height && first.m_width == second.m_width
- }
- bool operator==(const Complex & first, const Rectangle & second)
- {
- return first.m_height == second.m_height && first.m_width == second.m_width;
- }
- std::istream & operator>>(std::istream& stream, Rectangle & rectangle)
- {
- stream >> rectangle.m_width >> rectangle.m_height;
- return stream;
- }
- std::ostream& operator<<(std::ostream& stream, const Rectangle& rectangle)
- {
- stream << rectangle.m_with << rectangle.m_height;
- return stream;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement