decimalutskrivning|Programmering / Grafisk formgivning|Forum|Nordichardware

Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
The forums are currently locked and only available for read only access
sp_Feed sp_TopicIcon
decimalutskrivning
Fredrik Håkansson
Member
Medlem
Forum Posts: 8296
Member Since:
August 20, 2001
sp_UserOfflineSmall Offline
1
March 15, 2004 - 6:57 pm
sp_Permalink sp_Print

Hej igen 😉

Hur skriver man i C++ så att man alltid får två decimaler utskrivna när programmet ska skriva ut ett tal???

Fredrik Håkansson
Member
Medlem
Forum Posts: 8296
Member Since:
August 20, 2001
sp_UserOfflineSmall Offline
570493
March 15, 2004 - 7:06 pm
sp_Permalink sp_Print

Ett problem kan ju vara att jag tar talet från en pekare...

pekare->Get_Pris()
Chewie
Kommer du hit ofta?
Medlem
Forum Posts: 1516
Member Since:
September 13, 2001
sp_UserOfflineSmall Offline
570534
March 15, 2004 - 7:46 pm
sp_Permalink sp_Print

Om det handlar om konsollprogram, vilket jag förmodar. Så kolla in setprecision.
http://msdn.microsoft.com/libr.....embers.asp

Fredrik Håkansson
Member
Medlem
Forum Posts: 8296
Member Since:
August 20, 2001
sp_UserOfflineSmall Offline
570546
March 15, 2004 - 7:58 pm
sp_Permalink sp_Print

Tack... funkade inte med det... borde jag nämnt tidigare...

Har nog fixat det på ett annat sätt 😉

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1030
Currently Online:
Guest(s) 442
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Andreas Galistel: 16287
Jonas Klar: 15897
ilg@dd: 10810
Nyhet: 10607
Mind: 10550
Ctrl: 10355
Gueno: 9881
Guest: 9344
Snorch: 8881
Callister: 8468
Newest Members:
PetrbonFU PetrbonFU
Karine Bembry
Dolores Mcdaniels
Anibal McLeish
Francisca Alt
Alfie Everhart
Lester Huitt
Orlando Jorgensen
Mikki Lundgren
Dakota Kozlowski
Forum Stats:
Groups: 11
Forums: 59
Topics: 146630
Posts: 1300967

 

Member Stats:
Guest Posters: 2
Members: 79425
Moderators: 0
Admins: 11
Administrators: nordicadmin, Henrik Berntsson, Anton Karmehed, Carl Holmberg, Joel Oscarsson, Mikael Linnér, Mikael Schwartz, Andreas Paulsson, Nickebjrk, Mattias Pettersson, EmxL