![]() |
| ||
| Another question How do I set a fixed number of places. for example I want 1 to be 01. this is what I've been trying, but never works for some reason. Does anyone know how to do this. Thanks. int i = 1; cout << setprecision(2) << 1 ; |
| ||
| Re: Another question I'd try using strings or develop an internal representation using ints, but a display format that is right justified and filled to left to a specified field size using zeros by using ostream manipulators. |
| ||
| Re: Another question that was just an example, the program actually displays 100's of numbers. the only manipulator I can think of is setw but I dont want to repeat it several times. |
| ||
| Re: Another question Welcome to the tedium that can be found in C++. This particular feeling is particularly prevalent with formatted output. |
| ||
| Re: Another question ok, so does anyone how I can fix this? |
| All times are GMT -4. The time now is 12:30 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC