Hi, I'm trying to format my output in the console window in four separate fields, all evenly spaced.
out << left << setw(24) << "Name" << "Location"
<< right << setw(20) << "Acres " << "Rating" << endl;
out << left << setw(24) << "----" << "--------"
<< right << setw(20) << "----- " << "------" << endl;
while ( current_node )
{
out << left << setw(24) << current_node->item.getName() // equivalent tabs dont work?
<< current_node->item.getLocation() << right << setw(20)
<< current_node->item.getAcres()
<< " " << current_node->item.getRating()
<< endl;
current_node = current_node->nextByName;
}
The code above, for some reason, doesn't space it all evenly when the setw(n) are the same values...