Hi all,
I have a question. I have a function in my class that I am building that goes like this:
To me, I should expect it to give an output of:Code:void Ballot::Display() // In essence, this would be the display for one ballot // the format should be like the following: // 1) Bush Punched Age: 23 { // since this is the display for one ballot card // we put the number list in the Tally::Display() switch(who) { case BUSH: cout << "Bush\t"; break; case GORE: cout << "Gore\t"; break; case BUCHANAN: cout << "Buchanan\t"; break; case OTHER: cout << "Other\t"; break; case MULTIPLE: cout << "Multiple\t"; break; } switch(mark) { case PUNCHED: cout << "Punched\t"; break; case HANGING: cout << "Hanging\t"; break; case DIMPLED: cout << "Dimpled\t"; break; case NONE: cout << "None\t"; break; } cout << "Age: " << age; }
Instead, its giving me:Code:Bush Punched Age: 21 // depending on the user choices of course
I know that we can use the <iomanip> header file for that but how? Thank you.Code:Bush Punched Age: 21



LinkBack URL
About LinkBacks


