12345678910111213141516171819202122232425262728293031 |
- #include "myShape.h"
- void Shape::WhereAmI()
- {
- std::cout << "Now I am in class Shape" << std::endl;
- }
- void Shape::WhereAmIVirtual()
- {
- std::cout << "Now I am in class Shape" << std::endl;
- }
- Shape::Shape(colour colour, bool contour, double transparency)
- {
- m_colour = colour;
- m_contour = contour;
- m_transparency = transparency;
- }
- Shape::Shape(const Shape& other)
- {
- m_colour = other.m_colour;
- m_contour = other.m_contour;
- m_transparency = other.m_transparency;
- }
- Shape::~Shape()
- {
- std::cout << "Now I am in Shape's destructor!" << std::endl;
- }
|