overloaded ++ operator isn't working in c++

Viewed 1556

Can someone explain to me why my overloaded ++ (pre version) isn't updating the value? Snippet is like this:

circle circle:: operator++()
{  
    Area = Area * 2.0;
    return *this; 
}
/////////////////////////////

int main()
{
    class circle c1(4, 1, -1), c2(12, 4, 6);
    c1.output();
    c1++;
    c1.output();

    system("pause");
    return 0;
}
3 Answers
Related