Im outputting text to a file, using setw and setfill.
Im trying to create this in a text file:
However, I cannot get it to align correctly, and often the hundreds place lines up with the thousands place in the money column. Here's the code I'm using:Code:Gross Amount............. $1000.00
Federal Tax.............. $ 150.00
You probably noticed theres like 4 different 'right' in each line - basically because im tossing them everywhere to try and get it to align the money to the right. Any ideas? Im new at this.Code:outFile << "Gross Amount" << setfill('.') << right << setw(15) << right << " $" << grossAmount << right << endl;
outFile << "Federal Tax" << setfill('.') << right << setw(15) << right << " $" << federalTax << right << endl;