View Single Post
Old Feb 27th, 2006, 2:43 PM   #3
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Thanks for your help. Unfortunately, this doesn't seem to fix the problem. I tried

const Car& Car::operator++()
{
    ++ (* itsSpeed); 
}

// and 

const Car& Car::operator++()
{
    ++ * itsSpeed;
}

The result, still give me a value in the millions when incremented. Just try running the program and you'll see.
Eric the Red is offline   Reply With Quote