How would I make a column using iomanip?

Like this I guess.

My column output: Answer 1
                  Answer 2
                  Answer 3
                  Answer 4


Also I need to only display the answers that are greater than 0, so I need exclude and include certain ones each time.
@mrchicken

If you already know the number of answers you need, use a for loop.

1
2
3
for (int x=0;x<=number_of_answers;x++)
if ( answer[x] >0) // checking if array value is over 0.
cout << answer[x] << endl; // print answer. This will be skipped IF answer <=0 


This should point you in the direction needed..
Topic archived. No new replies allowed.