twomers 408 Posting Virtuoso

>> the prayer aught to be less effective [than the sacrifice].
Well that would make sense if both the religions were the same and the god to which you sacrifice ... it's like comparing apples and oranges. Sure they have similar properties (weight etc) ... (the apples and oranges that is), but many clear cut differences.

So no. The prayer aught not be less effective than a sacrifice.

twomers 408 Posting Virtuoso

^ Great dancer.

twomers 408 Posting Virtuoso

^ Great body!

twomers 408 Posting Virtuoso

3 :| I don't like scoring low in tests. I wanna take it again. I failed miserably :'( Anyone here give grinds???

twomers 408 Posting Virtuoso

Why are you bothering making the radius a pointer? It adds unnecessary complications ... not complications really, but there's no need.

using namespace std;

class Circle
{
private:
    int mRadius;

public:
    Circle();
    Circle(int n);
    Circle(const Circle &rhs);
    ~Circle();
    
    Circle operator = (const Circle &rhs);
    Circle operator++();
    Circle operator++(int);

    int getRadius() const {return mRadius;}
    void setRadius(int n) {mRadius=n;}
};

Circle::Circle()
    : mRadius( 5 )
{}

Circle::Circle(int n)
    : mRadius( n )
{}

Circle::Circle(const Circle &rhs)
    : mRadius( rhs.mRadius )
{}

Circle::~Circle()
{}

Circle Circle::operator++()
{
    mRadius++;
    return *this;
}
Circle Circle::operator++(int)
{
    mRadius++;
    return *this;
}
Circle Circle::operator = (const Circle &rhs)
{
    if( this == &rhs )
        return *this;

    mRadius = rhs.mRadius; // Friendly functions :)
    
    return rhs;
}

int main( void )
{
    Circle circ1;
    cout<< circ1.getRadius() <<"\n";

    Circle circ2(8);

    circ1=circ2;
    cout<< circ1.getRadius() <<"\n";

    ++circ1;
    cout<< circ1.getRadius() <<"\n";

    circ1++;
    cout<< circ1.getRadius() <<"\n";
    
    return 0;
}

Well. This is all your code without your pointer int. That isn't a requirement for your assignment is it? It gets rid of the need for a destructor and the need for new etc. I also threw in some initialisation list stuff and made use of the fact that instances are friends with eachother so you don't need to use the get radius method to access the radius.