For the first line from the file that the program reads, the setw command works as I expected it to: the string in tool is right justified 20 spaces over, and the temp variable is right justified 9 spaces from there.
For the second, third, and all subsequent reads from the file, the tool variable is left justified with no set width, and the temp variable is right justified 9 spaces.
Is there something I am missing related to the data I'm putting into temp being the end of the line that is causing the setw not to do what I think it should on later passes through the loop? Or is there something else that I am missing?
I've looked through my book some, and haven't found anything. Clearly, I'm a beginner, so I expect this to be a simple thing that I have missed.