In your constructor, you have this bit of code:
Code:
CMoney::CMoney()
{
int dollars=0;
int cents=0;
bool isNegative=false;
char dsign=0;
...
The fact that you're giving each variable a type tells the compiler that you're declaring each variable for the first time, making them local variables that will go out of scope. Don't forget that you already gave the type for these variables in your class declaration! Here's how it should be done:
Code:
CMoney::CMoney()
{
dollars = 0;
cents = 0;
isNegative = false;
dsign = 0;
printf("Initialize CMoney in constructor: dollars is %d, cents is %d\n\n", dollars, cents);
}