For starters, format your code properly, e.g.,
Code:
deduction = 0;
if (deductiontype.compare("Itemized") == 0)
{
while (1)
{
input >> deditem;
if (deditem == 0)
break;
deduction = deduction + deditem;
}
}
Now, it is easy to see that you can simplify to:
Code:
deduction = 0;
if (deductiontype.compare("Itemized") == 0)
{
while ((input >> deditem) && deditem != 0)
{
deduction += deditem;
}
}
Incidentally, if you were just looking to replace the 1, then replace it with true, or you can use for (;;) instead.